简单
2023-11-05 16:01:55
发布于:广东
1阅读
0回复
0点赞
6,真是简单
#include <iostream>
using namespace std;
int main(){
int week;
cin >> week;
int weeker;
weeker = 1+week;
while(weeker>7){
weeker=weeker-7;
}
switch(weeker){
case 1: cout << "monday";break;
case 2: cout << "tuesday";break;
case 3: cout << "wednesday";break;
case 4: cout << "thursday";break;
case 5: cout << "friday";break;
case 6: cout << "saturday";break;
case 7: cout << "sunday";break;
}
return 0;
}
这里空空如也
有帮助,赞一个