Guest User

Untitled

a guest
May 23rd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. typedef struct Szemely{
  4.   char nev[30];
  5.   int kor;
  6. } Szemely;
  7.  
  8. int fiatalkoru(int kor)
  9. {
  10.   if(kor<18){  return 1;  }
  11.   else{  return 0;  }
  12. }
  13.  
  14.  
  15. int main (int argc, char *argv[])
  16. {
  17.   Szemely person;
  18.  
  19.   person.nev = argv[1];
  20.   person.kor = argv[2];
  21.  
  22.   if(fiatalkoru(person.kor) == 1){  printf("fiatalkorú");  }
  23.   else{  printf("felnőtt");  }
  24. }
Add Comment
Please, Sign In to add comment