Guest User

Untitled

a guest
Jan 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. int osoba_cmp (const void *va;const void *vb)
  6. {
  7. struct Osoba *oa=(struct Osoba*)va,*ob=(struct Osoba*)ob;
  8. return ???;
  9. }
  10.  
  11.  
  12. int main ()
  13. {
  14. char meno[100],priezvisko[100];
  15. struct osoba {char *meno,*priezvisko;};
  16. int i=0;
  17. while (scanf ("%s %s",meno,priezvisko)>0)
  18. {
  19.  
  20.  
  21. if (!strcmp(meno,"BYE")) break ;
  22. i++;
  23. }
  24. Osoba meno[100];
  25. qsort(meno,i,sizeof(struct Osoba),osoba_cmp);
  26. return 0;
  27. }
Add Comment
Please, Sign In to add comment