Help me in solving GDTURN problem

My issue

My code

#include <stdio.h>

int main() {
int x, y, n,t;
if(t<=100){
printf("Enter two numbers : ");
scanf("%d,%d", &x,&y);
n = x+y;
else if(n>6){
    printf("YES");
    t++;
}

else{
    printf("NO");
}
}
	return 0;
}


Problem Link: GDTURN Problem - CodeChef

  1. You need to take input of t (testcases) every time because number of testcases are different each time.

  2. No need of printf("Enter two numbers : ");
    The compiler is smart enough.

  3. increment t++ at the end.
    In your code it is inside else if block that means when the condition is inside else if is true then only t will be incremented.

black_witch there are few problems:

  1. u didn’t take test case you just took 2 value and compared it, which was not the question wanted it. kindly read again.
  2. don’t use else if use if condition there then you code will run but it will not satisfy the answer.
  3. why t++ …there is no loop . just conditions.

I didn’t pointed out these mistakes. I really appreciate your work buddy.