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

Nested If-Else Chain

easyIf Statements

📄 Code

Read carefully — what does this print?
1#include <stdio.h>
2 
3int main() {
4 int score = 75;
5 if (score >= 90) {
6 printf("A\n");
7 } else if (score >= 80) {
8 printf("B\n");
9 } else if (score >= 70) {
10 printf("C\n");
11 } else if (score >= 60) {
12 printf("D\n");
13 } else {
14 printf("F\n");
15 }
16 return 0;
17}

🎯 Your Answer