题解 | 判断季节
#include <iostream>
using namespace std;
#define moth_choose(month)\
if(month<1||month>12)\
{\
cout<<"不合法"<<endl;\
}\
else if(month>=3&&month<=5)\
{\
cout<<"春季"<<endl;\
}\
else if(month>=6&&month<=8)\
{\
cout<<"夏季"<<endl;\
}\
else if(month>=9&&month<=11)\
{\
cout<<"秋季"<<endl;\
}\
else\
{\
cout<<"冬季"<<endl;\
}
int main() {
int month;
cin >> month;
// write your code here......
moth_choose(month);
return 0;
}
海康威视公司福利 1117人发布