Advertisement
Josif_tepe

Untitled

Oct 7th, 2023
734
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. #include <iostream>
  2. //#include <bits/stdc++.h>
  3. using namespace std;
  4.  
  5. struct ucenik {
  6.     string ime;
  7.     string prezime;
  8.     int godini;
  9.     double prosek;
  10.     string sredno_uciliste;
  11. };
  12.  
  13. int main() {
  14.    
  15.     int n;
  16.     cin >> n;
  17.    
  18.     ucenik ucenici[n];
  19.    
  20.     for(int i = 0; i < n; i++) {
  21.         cin >> ucenici[i].ime >> ucenici[i].prezime >> ucenici[i].godini >> ucenici[i].prosek >> ucenici[i].sredno_uciliste;
  22.     }
  23.    
  24.     for(int i = 0; i < n; i++) {
  25.         cout << ucenici[i].ime << " " << ucenici[i].prezime << " "<< ucenici[i].godini << " " << ucenici[i].prosek << " "<< ucenici[i].sredno_uciliste << endl;
  26.     }
  27.    
  28.     return 0;
  29. }
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement