Help me in solving CLB067 problem

My issue

My code

#include <stdio.h>

int main() {
    
    
    int r;
    int b;
    r = 45;
    b = 23;
    if (r > b) {
        printf("Rob Scored higher marks than Bob.\n");
    }else if (r == b) {
        printf("Bob & Rob both scored the same\n");
    }
    
     
    r=15;
    b=15;
    if (r > b) {
        printf("Rob Scored higher marks then Bob.");
    }else if (r == b) {
        printf("Bob & Rob scored the same");
    }
    
	// your code goes here
	return 0;
}


Learning course: Learn C
Problem Link: CodeChef: Practical coding for everyone

using the for loop ,can reduce the number lines and the program gets submitted.
Here is the program using for loop.
include <stdio.h>

int main(void) {
int b=23,r=45;
for(int i=1;i<=2;i++)
{

if(r>b)
printf("Rob Scored higher marks than Bob.\n");
else if(b==r)
printf("Bob & Rob both scored the same\n");
b=15;// b and r gets updated here.
r=15;
}

return 0;

}