C语言测试题
发布网友
发布时间:2022-04-21 22:36
我来回答
共1个回答
热心网友
时间:2023-12-03 04:21
#include<stdio.h>
int main() {
int day,w;
char week[7][10]={"一","二","三","四","五","六","日"};
printf("输入1至31之间的日期:");
scanf("%d",&day);
w=(day-1)%7+2;
printf("%d号是星期%s",day,week[w-1]);
}