Advertisement
Josif_tepe

Untitled

Aug 17th, 2021
122
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.  
  3. using namespace std;
  4.  
  5.  
  6. struct student {
  7.     string ime, prezime;
  8.     int godini;
  9.     double prosek;
  10. };
  11. int main()
  12. {
  13.     int n;
  14.     cin >> n;
  15.     student niza[n];
  16.     for(int i = 0; i < n; i++) {
  17.         cin >> niza[i].ime >> niza[i].prezime >> niza[i].godini >> niza[i].prosek;
  18.     }
  19.    
  20.     for(int i = 0; i < n; i++) {
  21.         cout << niza[i].ime << " "<< niza[i].prezime << " " << niza[i].godini << " " << niza[i].prosek << endl;
  22.     }
  23.     return 0;
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement