Created
October 1, 2013 15:09
-
-
Save caioerick/6779976 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int main(int narg, char *argv[]) { | |
system("clear"); | |
int continua = 1; | |
char opcao; | |
arquivo = fopen("agenda.txt","r"); | |
while(continua == 1) { | |
menu(); | |
printf("Opção: "); | |
scanf("%c", &opcao); | |
printf("Opção: %c\n", opcao); | |
if(strcmp(opcao, 'B') == 0) { | |
search(); | |
continua = 0; | |
} | |
else if(strcmp(opcao, 'I') == 0) { | |
add(); | |
continua = 0; | |
} | |
else if(strcmp(opcao, 'A') == 0) { | |
delete(); | |
continua = 0; | |
} | |
else if(strcmp(opcao, 'L') == 0) { | |
all(); | |
continua = 0; | |
} | |
if(continua == 1) { | |
printf("Opção inválida!\n\n"); | |
} | |
} | |
return EXIT_SUCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment