求再次输入循环思路???
#include<stdio.h>int main()
{
int iDay= 0;
printf("please input a number:\n");
scanf("%d",&iDay);
switch(iDay)
{
case 1:
case 2:
case 3:
case 4:
case 5:printf("Today to work hark\n");break;
case 6:printf("Today stay at home to sleep\n");break;
case 7:printf("Go shopping with friends\n");break;
default:printf("Error\n");
if(iDay>7)
{
printf("please enter a number\n");//输入一个数为错误的 这里想再输入一个 一直输入正确为止 然后跳出循环 怎么用循环呢? 求解?
}
}
return 0;
}