YTU.2431: C语言习题 医生值班

2431: C语言习题 医生值班

Time Limit: 3 Sec   Memory Limit: 128 MB
Submit: 1212   Solved: 322
[ Submit][ Status][ Web Board]

Description

医院内科有A,B,C,D,E,F,G,H共七位医生,每人在一周内要值一次夜班,排班的要求是:
(1) A医生值班日比C医生晚1天
(2) D医生值班日比E医生晚2天
(3) B医生值班日比G医生早3天
(4) F医生的值班日在B医生和C医生的值班日之间,且是星期四 
请编写程序,输出每位医生的值班日。值班日以Sunday, Monday ,Tuesday, Wednesday, Thursday, Friday, Saturday分别表示星期日到星期六。

Input

Output

每位医生的值班日

Sample Input

 

Sample Output

you guess!

HINT

用枚举变量。


输出提示:


Doctor A is on duty Sunday.

Doctor B is on duty            .

Doctor C is on duty            .

Doctor D is on duty            .

Doctor E is on duty            .

Doctor F is on duty            .

Doctor G is on duty            .    (别忘了每一行最后的点呦)

分析:枚举法

但仔细看看题目,就是一道简单的推理题,直接可以脑算出结果,输出即可。
省时又省力。

代码:
#include <stdio.h>
 
int main()
{
    printf("Doctor A is on duty Sunday.\n");
    printf("Doctor B is on duty Tuesday.\n");
    printf("Doctor C is on duty Saturday.\n");
    printf("Doctor D is on duty Wednesday.\n");
    printf("Doctor E is on duty Monday.\n");
    printf("Doctor F is on duty Thursday.\n");
    printf("Doctor G is on duty Friday.");
    return 0;
}


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

黎曼猜想·

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值