Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. void list_add_lekarz(lekarz **first)
  2. {
  3. char tmp;
  4. lekarz *nowy=(lekarz *)malloc(sizeof(lekarz));
  5. printf("Imie:");
  6. scanf("%s", &nowy->imie);
  7. printf("nazwisko: ");
  8. scanf("%s", &nowy->nazwisko);
  9. printf("pesel: ");
  10. scanf("%s", &nowy->pesel);
  11. printf("adres: ");
  12. scanf("%s", &nowy->adres);
  13. printf("email: ");
  14. scanf("%s", &nowy->email);
  15. printf("telefon kontaktowy: ");
  16. scanf("%s", &nowy->telefon_kontaktowy);
  17. printf("specjalizacje (max 5): ");
  18. for(int i=0; i<5; i++)
  19. {
  20. scanf("%s", &nowy ->specjalizacje[i]);
  21. printf("dodac kolejna ? t n /n");
  22. scanf("%s", &tmp);
  23. if(tmp=='n')
  24. break;
  25. }
  26. nowy->next=*first;
  27. *first=nowy;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement