CJCoding With Joseph
15per day
← Back to Question List
C++ Code Walkthrough #13

If-Else Chain

easyIf Statements

📄 Code

Read carefully — what does this print?
1#include <iostream>
2using namespace std;
3 
4int main() {
5 int score = 75;
6 if (score >= 90) {
7 cout << "A" << endl;
8 } else if (score >= 80) {
9 cout << "B" << endl;
10 } else if (score >= 70) {
11 cout << "C" << endl;
12 } else {
13 cout << "F" << endl;
14 }
15 return 0;
16}

🎯 Your Answer