为什么只有20分!!!!

wchzh objection 2024-06-01 15:37:25 4

#include <bits/stdc++.h> using namespace std; int main() {

int a, b, c, d;
cin >> a;
if (a<=0<= 3) {
    cout << "infant";
} else if (a >= 4 && a <= 12) {

    cout << "child";
} else if (a >= 13 && a <= 18) {

    cout << "youngster";

} else if (a >= 19 && a <= 25) {

    cout << "youth";
}

}

{{ vote && vote.total.up }}

共 1 条回复

root 站长

a <= 0 <= 3 改成 0 <= a && a <= 3