Here is the interview problem for Exawizards intern and I’m unable to find an approach for this problem. Please help out!!
Thanks in advance
Here is the interview problem for Exawizards intern and I’m unable to find an approach for this problem. Please help out!!
Thanks in advance
I am getting this Error bro can anyone help me
??
Error :
Main.java:3: error: class chef_on_vacaton_codecheff is public, should be declared in a file named chef_on_vacaton_codecheff.java
public class chef_on_vacaton_codecheff{
^
1 error
import java.util.Scanner;
public class chef_on_vacaton_codecheff{
static Scanner sc = new Scanner(System.in);
static void trip(){
int x=sc.nextInt(),y=sc.nextInt(),z=sc.nextInt();
if(x+y<=z){
System.out.println(“YES”);
}
else System.out.println(“NO”);
}
public static void main(String[]arg){
int tc = sc.nextInt();
while(tc–>0)trip();
}
}