Advertisement
Guest User

Registro

a guest
Nov 22nd, 2019
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. void cadastroPessoa(struct pessoa agenda[100]){
  2. //qual pósição do vetor tem que adicionar?
  3. pessoa cadastro;
  4.  
  5. printf("\nNome: ");
  6. fflush(stdin);
  7. fgets(cadastro.nome, 40, stdin);
  8.  
  9. printf("\nE-mail: ");
  10. fflush(stdin);
  11. fgets(cadastro.email, 40, stdin);
  12.  
  13. printf("\nRua: ");
  14. fflush(stdin);
  15. fgets(cadastro.enderecoPessoa.rua, 40, stdin);
  16.  
  17. printf("\nNumero: ");
  18. fflush(stdin);
  19. fgets(cadastro.enderecoPessoa.numero, 40, stdin);
  20.  
  21. printf("\nComplemento : ");
  22. fflush(stdin);
  23. fgets(cadastro.enderecoPessoa.complemento, 40, stdin);
  24.  
  25. printf("\nBairro: ");
  26. fflush(stdin);
  27. fgets(cadastro.enderecoPessoa.bairro, 40, stdin);
  28.  
  29. printf("\nCEP: ");
  30. fflush(stdin);
  31. scanf("%d",cadastro.enderecoPessoa.CEP);
  32.  
  33. printf("\nCidade: ");
  34. fflush(stdin);
  35. fgets(cadastro.enderecoPessoa.cidade, 40, stdin);
  36.  
  37. printf("\nPais: ");
  38. fflush(stdin);
  39. fgets(cadastro.enderecoPessoa.pais, 40, stdin);
  40.  
  41. adicionarPessoa(cadastro,agenda);
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement