Advertisement
Josif_tepe

Untitled

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