if(5num)把常量放在等号左边风格更优
//输出奇数
int i=1;
while(i<=100)
{
if(i%21)
printf("%d ",i);
i++;
}
//不用if
int i=1;
while(i<=100)
{
printf("%d ",i);
i+=2;
}
int day=0;
scanf("%d",&day);
switch(day)
{
case 1:
case 2:
case 3:
case 4:
case 5:
printf("workday\n);
break;
case 6:
case 7:
printf(“playday\n”);
break;
default:
printf(“input error\n”);
break;
}