My issue
Can anyone please explain why I am getting errors in this simple code? Although I have reviewed the code many times.
My code
#include <stdio.h>
int main() {
// int b = 23, r = 45;
// if (r > b) {
// printf("Rob scored higher marks than Bob.\n");
// } else if (r == b) {
// printf("Bob & Rob both scored the same.\n");
// } else {
// printf("Bob scored higher marks than Rob.\n");
// }
int b = 15, r = 15;
if (r > b) {
printf("Rob Scored higher marks than Bob.\n");
} else if (r == b) {
printf("Bob & Rob both scored the same\n");
} else {
printf("Bob scored higher marks than Rob.\n");
}
return 0;
}
Learning course: CSEIPFOIA: Programming and Problem Solving
Problem Link: Else If Statement Practice Problem in CSEIPFOIA: Programming and Problem Solving - CodeChef