Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include "functions.h"
- void showMenu();
- int count = 0;
- Contact arrCon[100];
- void main() {
- int choice;
- while(1) {
- system("cls");
- showMenu();
- scanf("%d",&choice);
- switch (choice) {
- case 1:
- load();
- break;
- case 2:
- printf("Searching..\n");
- break;
- case 3:
- printf("Adding..\n");
- break;
- case 4:
- printf("Deleting..\n");
- break;
- case 5:
- printf("Modifying..\n");
- break;
- case 6:
- printf("Sorting..\n");
- break;
- case 7:
- saveFile();
- break;
- case 8:
- exit(0);
- default:
- printf("Command not recognized\n");
- }
- }
- }
- void showMenu(){
- printf("Please choose one of the following commands\n");
- printf("1 --> Load\n");
- printf("2 --> Search\n");
- printf("3 --> Add\n");
- printf("4 --> Delete\n");
- printf("5 --> Modify\n");
- printf("6 --> Sort\n");
- printf("7 --> Save\n");
- printf("8 --> Quit\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement