题解 | #判断季节#
判断季节
https://www.nowcoder.com/practice/741a9b79fabe474cb153a49b4bff5828
#include <iostream> using namespace std; int main() { int s; cin >> s; cout<<(s>12?"不合法":(s==12?"冬季":(s>=9?"秋季":(s>=6?"夏季":(s>=3?"春季":(s>=1?"冬季":"不合法"))))))<<endl; // write your code here...... return 0; }