Advertisement
Josif_tepe

Untitled

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