多写点if就行了
2026-07-09 21:28:22
发布于:上海
11阅读
0回复
0点赞
代码:
#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
if(n%7==0)cout<<"monday";
if(n%7==1)cout<<"tuesday";
if(n%7==2)cout<<"wednesday";
if(n%7==3)cout<<"thursday";
if(n%7==4)cout<<"friday";
if(n%7==5)cout<<"saturday";
if(n%7==6)cout<<"sunday";
return 0;
}
全部评论 4
《多写亿点if就行了》
3天前 来自 内蒙古
01
4天前 来自 上海
01
4天前 来自 上海
01
4天前 来自 上海
01
4天前 来自 上海
01
4天前 来自 上海
0





有帮助,赞一个