Help me in solving TOP10 problem

My issue

Why do we need to have int X; scanf(“%d”,&X); inside for loop…why isnt working outside loop?

My code

#include <stdio.h>

int main(void) {
	int T,i;
	
	
	scanf("%d",&T);
	
	int X;
	    scanf("%d",&X);
	    
	    
	for (i=0;i<T;i++)
	{
	    
	    if(X<=10){
	        printf("YES\n");
	    }else{
	        printf("NO\n");
	    }
	}
	return 0;
}


Problem Link: TOP10 Problem - CodeChef

@stutig
Because u have to scan X t times that is why u scan X inside the loop