Advertisement
Josif_tepe

Untitled

Mar 26th, 2021
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5. struct student {
  6.     char ime[101];
  7.     char prezime[101];
  8.     int godina;
  9.     double prosek;
  10. };
  11. typedef struct student student;
  12. int main() {
  13.     int n;
  14.     scanf("%d", &n);
  15.     student niza[n];
  16.    
  17.     for(int i = 0; i < n; i++) {
  18.         scanf("%s%s%d%lf", niza[i].ime, niza[i].prezime, &niza[i].godina, &niza[i].prosek);
  19.     }
  20.     for(int i = 0; i < n; i++) {
  21.         printf("%s %s %d %lf\n", niza[i].ime, niza[i].prezime, niza[i].godina, niza[i].prosek);
  22.     }
  23.        
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement