求赞(题解)
2024-01-30 17:44:08
发布于:广东
3阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int main(){
int day=1,guo;
cin>>guo;
day=day+guo;
day%=7;
if(day==0) cout<<"sunday";
else if(day==1) cout<<"monday";
else if(day==2) cout<<"tuesday";
else if(day==3) cout<<"wednesday";
else if(day==4) cout<<"thursday";
else if(day==5) cout<<"friday";
else cout<<"saturday";
return 0;
}
全部评论 1
thinks!
2024-04-05 来自 广东
0
有帮助,赞一个