Advertisement
Josif_tepe

Untitled

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