Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <conio.h>
- int
- main (void)
- {
- struct agenda //Definindo informacoes de Cadastro
- {
- char nome[50];
- char telefone[20];
- char endereco[50];
- char email[50];
- };
- struct agenda agenda; // Definindo a variavel
- printf ("\n::::.... Agenda ....::::\n\n\n");
- //registrando informações
- printf ("Informe o nome:");
- fflush (stdin);
- fgets (agenda.nome, 50, stdin);
- printf ("Informe o telefone:");
- fflush (stdin);
- fgets (agenda.telefone, 20, stdin);
- printf ("Informe o endereco:");
- fflush (stdin);
- fgets (agenda.endereco, 50, stdin);
- printf ("Informe o email:");
- fflush (stdin);
- fgets (agenda.email, 50, stdin);
- //imprimindo informações registradas
- printf ("\n\n --------- informações registradas ---------\n\n");
- printf ("Nome .....................: %s\n", agenda.nome);
- printf ("Telefone .................: %s\n", agenda.telefone);
- printf ("Endereco .................: %s\n", agenda.endereco);
- printf ("Email ....................: %s\n", agenda.email);
- getch ();
- return (0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement