#include<stdio.h>
#include<stdio.h>
#include<string.h>
char choice;
void showtopmenu()
{
printf("1 add\n");
printf("2 update\n");
printf("3 delete\n");
printf("4 showall\n");
printf("5 showone\n");
printf("6 exit\n");
}
void process_add()
{
printf("process_add\n");
showtopmenu();
}
void process_update()
{
printf("process_update\n");
showtopmenu();
}
void process_delete()
{
printf("process_delete\n");
showtopmenu();
}
void process_showall()
{
printf("process_showall\n");
showtopmenu();
}
void process_showone()
{
printf("process_showone\n");
showtopmenu();
}
void process_exit()
{
exit(0);
}
main()
{
showtopmenu();
while(1)
{
choice = getchar();
switch(choice)
{
case '1': process_add();break;
case '2': process_update();break;
case '3': process_delete();break;
case '4': process_showall();break;
case '5': process_showone();break;
case '6': process_exit();break;
default : showtopmenu();
}
}
}