Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void cadastroPessoa(struct pessoa agenda[100]){
- //qual pósição do vetor tem que adicionar?
- pessoa cadastro;
- printf("\nNome: ");
- fflush(stdin);
- fgets(cadastro.nome, 40, stdin);
- printf("\nE-mail: ");
- fflush(stdin);
- fgets(cadastro.email, 40, stdin);
- printf("\nRua: ");
- fflush(stdin);
- fgets(cadastro.enderecoPessoa.rua, 40, stdin);
- printf("\nNumero: ");
- fflush(stdin);
- fgets(cadastro.enderecoPessoa.numero, 40, stdin);
- printf("\nComplemento : ");
- fflush(stdin);
- fgets(cadastro.enderecoPessoa.complemento, 40, stdin);
- printf("\nBairro: ");
- fflush(stdin);
- fgets(cadastro.enderecoPessoa.bairro, 40, stdin);
- printf("\nCEP: ");
- fflush(stdin);
- scanf("%d",cadastro.enderecoPessoa.CEP);
- printf("\nCidade: ");
- fflush(stdin);
- fgets(cadastro.enderecoPessoa.cidade, 40, stdin);
- printf("\nPais: ");
- fflush(stdin);
- fgets(cadastro.enderecoPessoa.pais, 40, stdin);
- adicionarPessoa(cadastro,agenda);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement