展开全部
#include<stdio.h>
main()
{
char i,j;
printf("please enter the first letter:\n ");
scanf("%c",&i);
switch(i)
{
case 'm':
printf("monday\n");
break;
case 'w':
printf("wednesday\n");
break;
case 'f':
printf("friday\n");
break;
case 't':
printf("please enter the next letter:\n");
scanf("%c",&j);
j=getchar();
if (j=='u')
printf("tuesday\n");
if (j=='h')
printf("thursday\n");
break;
case 's':
printf("please enter the next letter:\n");
scanf("%c",&j);
j=getchar();
if (j=='a')
printf("saturday\n");
if (j=='u')
printf("sunday\n"); break;
default : printf("error\n"); break;
}
}
main()
{
char i,j;
printf("please enter the first letter:\n ");
scanf("%c",&i);
switch(i)
{
case 'm':
printf("monday\n");
break;
case 'w':
printf("wednesday\n");
break;
case 'f':
printf("friday\n");
break;
case 't':
printf("please enter the next letter:\n");
scanf("%c",&j);
j=getchar();
if (j=='u')
printf("tuesday\n");
if (j=='h')
printf("thursday\n");
break;
case 's':
printf("please enter the next letter:\n");
scanf("%c",&j);
j=getchar();
if (j=='a')
printf("saturday\n");
if (j=='u')
printf("sunday\n"); break;
default : printf("error\n"); break;
}
}
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |