91学习

陪伴你每一天!

根据输入的日期判定在干什么

#include <stdio.h>


int main(){

int iDay=0;

int Monday=1,Tuesday=2,Wednesday=3,Thursday=4,Friday=5,Saturday=6,Sunday=7;

printf("enter a day of week to get course:\n");

scanf("%d",&iDay);


if(iDay>Friday){

if(iDay==Saturday){

printf("Go shopping with friends\n");

}else{

printf("At home with families\n");

}

}else{

if(iDay==Monday){

printf("Have a meeting in the company\n");

}else{

printf("Working with partner\n");

}

}

return 0;

}

POSji18790284560.png

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。