-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
62 lines (45 loc) · 1.47 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
57
58
59
60
61
62
/************************************************************* HEADER FILES *****************************************************************/
#include<stdio.h>
#include"head.h"
#include<string.h>
#include<stdlib.h>
#include<conio.h>
/********************************************************* MAIN FUNCTION ********************************************************************/
int main()
{
int choice,dummy;
char ans;
do
{
printf("\n=*=*=*=*=*=*=*=*=* PHONEBOOK *=*=*=*=*=*=*=*=*=*");
printf("\n\n 1.INSERT RECORD \n 2.DISPLAY RCEORD \n 3.SEARCH RECORD \n 4.MODIFY RECORD \n 5.DELETE PREVIOUS ENTERED RECORD \n 6.SORT RECORDS \n 7.EXIT ");
printf("\n\n Enter any one of the options : ");
scanf("%d",&choice);
//clears screen
system("cls");
switch(choice)
{
case 1: enter_data();
break;
case 2: display_record();
break;
case 3: search();
break;
case 4: modify_data();
break;
case 5: delete_record();
break;
case 6: sort_record();
break;
case 7: exit(0);
break;
default: printf("\n Enter choice between 1 to 7 ");
}
printf("\n Do you want to choose any other option on main screen ? (y/n): ");
scanf("%d",&dummy);
scanf("%c",&ans);
system("cls");
}while(ans=='y'||ans=='Y');
return(0);
}
/**************************************************************** END ***********************************************************************/