Advertisement
Josif_tepe

Untitled

Sep 1st, 2021
144
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. struct student {
  5.     string ime, prezime;
  6.     int godini;
  7.     string grad;
  8. };
  9. int main() {
  10.     int n;
  11.     cin >> n;
  12.    
  13.     student niza[n];
  14.    
  15.     for(int i = 0; i < n; i++) {
  16.         cin >> niza[i].ime >> niza[i].prezime >> niza[i].godini >> niza[i].grad;
  17.     }
  18.     for(int i = 0; i < n; i++) {
  19.         cout << niza[i].ime << " " << niza[i].prezime << " " << niza[i].godini << " " << niza[i].grad << endl;
  20.     }
  21.     return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement