小菜单--难度为0
//menu #include<stdio.h>
void printf_chose(char chose);
int main(int argc,char *argv[])
{
char chose;
printf_chose(chose);
}
void printf_chose(char chose)
{
printf("Wellcome!chose(1-4;4 to quit)\n");
while(1)
{
scanf("%d",&chose);
if(chose==4)
{
printf("Bye!\n");
break;
}
if(chose<0||chose>4)
{
printf("Please input again attention olny 1-4:\n");
continue;
}
switch(chose)
{
case 1: printf("1\n");
break;
case 2: printf("2\n");
break;
case 3: printf("3\n");
break;
}
}
}