-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
56 lines (51 loc) · 1.19 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include <stdio.h>
#include <stdlib.h>
#include "agenda.c"
int main()
{
int n;
Lista *li = cria_lista();
do
{
//MENU
system("cls");
printf("MENU\n\n");
printf("1. Inserir Contato\n");
printf("2. Excluir Contato\n");
printf("3. Alterar Contato\n");
printf("4. Pesquisar Contato\n");
printf("5. Exibir Contatos\n");
printf("6. Estado da Agenda\n");
printf("0. Sair\n\n");
printf("Opcao: ");
scanf("%d", &n);
switch (n)
{
case 1:
insereContato(li);
break;
case 2:
excluiContato(li);
break;
case 3:
alterarContato(li);
break;
case 4:
pesquisarContato(li);
break;
case 5:
exibirContatos(li);
break;
case 6:
estadoAgenda(li);
break;
case 0:
break;
default:
printf("Opcao invalida! Insira novamente...");
getchar();
}
} while(n != 0);
libera_lista(li);
return 0;
}