Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- struct student {
- char ime[101];
- char prezime[101];
- int godina;
- double prosek;
- };
- typedef struct student student;
- int main() {
- int n;
- scanf("%d", &n);
- student niza[n];
- for(int i = 0; i < n; i++) {
- scanf("%s%s%d%lf", niza[i].ime, niza[i].prezime, &niza[i].godina, &niza[i].prosek);
- }
- for(int i = 0; i < n; i++) {
- printf("%s %s %d %lf\n", niza[i].ime, niza[i].prezime, niza[i].godina, niza[i].prosek);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement