1个回答
推荐于2017-05-22
展开全部
#include "stdio.h"
void main()
{
float x;
scanf("%f",&x);
switch( x )
{
case 0 :printf("Sunday.");break;
case 1 :printf("Monday.");break;
case 2 :printf("Tuesday.");break;
case 3 :printf("Wednesday.");break;
case 4 :printf("Thursday.");break;
case 5 :printf("Friday.");break;
case 6 :printf("Saturday.");break;
default :printf("不存在这个星期!\\n");
}
void main()
{
float x;
scanf("%f",&x);
switch( x )
{
case 0 :printf("Sunday.");break;
case 1 :printf("Monday.");break;
case 2 :printf("Tuesday.");break;
case 3 :printf("Wednesday.");break;
case 4 :printf("Thursday.");break;
case 5 :printf("Friday.");break;
case 6 :printf("Saturday.");break;
default :printf("不存在这个星期!\\n");
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询