Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- typedef struct
- {
- char ime[31];
- int starost;
- }osoba;
- void citaj(osoba *a)
- {
- gets((*a)ime);
- scanf("%d"&(*a) starost);
- }
- void pisi(osoba a)
- {
- printf("%s %d\n", a ime, a starost);
- }
- int main(){
- osoba o1,o2,o3,najstariji;
- citaj(&o1);
- citaj(&o2);
- citaj(&o3);
- najstariji=o1
- if(najstariji.starost<o2.starost)najstariji=o2;
- if(najstariji.starost<o3.starost)najstariji=o3;
- printf("%d",najstariji.ime);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement