代码:
void show_menu()
{
int menu_num;
system("clear");
printf("welcome to student system!\n");
printf("please select the number you want!\n");//chose the function.
printf("1.registe\n");
printf("2.login\n");
printf("I chose:");
scanf("%d",&menu_num);
if((menu_num != 1) && (menu_num != 2) )
{
getchar();
printf("chose error,please input again:\n");
getchar();
show_menu();
}
switch (menu_num)
{
case 1:printf("registe\n");break;
case 2:printf("login\n");break;
}
printf("Hello**,welcome to student_system!\n");
printf("Please input you want the num