1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #include <iostream> using namespace std; int main() { int A = 0; while (1) { cin >> A; if (A >= 0 && A <= 100) break; } if (A >= 90 && A <= 100) cout << “A” << endl; else if (A >= 80 && A <= 89) cout << “B” << endl; else if (A >= 70 && A <= 79) cout << “C” << endl; else if (A >= 60 && A <= 69) cout << “D” << endl; else cout << “F” << endl; return 0; } | cs |