Advertisement
Josif_tepe

Untitled

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