C++简洁代码:
#include<bits/stdc++.h> using namespace std; int main () { int core; string res; cin >> core; if (core >= 10) res = "Danger++"; else if (core >= 4 && core <= 9) res = "Danger"; else res = "Good"; cout << res << endl; return 0; }
C++简洁代码:
#include<bits/stdc++.h> using namespace std; int main () { int core; string res; cin >> core; if (core >= 10) res = "Danger++"; else if (core >= 4 && core <= 9) res = "Danger"; else res = "Good"; cout << res << endl; return 0; }