My issue
import java.util.Scanner;
class Codechef
{
public static void main (String args)
{
Scanner read = new Scanner(System.in);
int t = read.nextInt();
for(int i=0; i<t; i++)
{
int x = read.nextInt();
int y = read.nextInt();
int a = read.nextInt();
// Update your code below this line solve the problem
if(x<=a && a<y){
System.out.println("YES");
}
else{
System.out.print("NO");
}
}
}
}
What is the mistake for in this program.
My code
import java.util.Scanner;
class Codechef
{
public static void main (String[] args)
{
Scanner read = new Scanner(System.in);
int t = read.nextInt();
for(int i=0; i<t; i++)
{
int x = read.nextInt();
int y = read.nextInt();
int a = read.nextInt();
// Update your code below this line solve the problem
if(x<=a && a<y){
System.out.println("YES");
}
else{
System.out.print("NO");
}
}
}
}
Learning course: Logic Building in Java
Problem Link: CodeChef: Practical coding for everyone