Advertisement
Josif_tepe

Untitled

Mar 12th, 2023
599
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Student {
  5. public:
  6.    
  7.     char ime[50];
  8.     int godini;
  9.     double prosek;
  10. };
  11. int main() {
  12.     int n;
  13.     cin >> n;
  14.    
  15.     Student students[n];
  16.    
  17.     for(int i = 0; i < n; i++) {
  18.         cin >> students[i].ime >> students[i].godini >> students[i].prosek;
  19.     }
  20.  
  21.     for(int i = 0; i < n; i++) {
  22.         cout << students[i].ime << " " << students[i].godini << " " << students[i].prosek << endl;
  23.     }
  24.     return 0;
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement