My issue
My code
#include <stdio.h>
int main(void) {
int i,x,y,n;
//scanf("%d",&n);
//printf("%d\n",n);
//for(i=0;i<n;i++)
//{
scanf("%d%d",&x,&y);
if((x+y)>6)
{
// printf("%d %d ",x,y);
printf("YES\n");
}
else
{
// printf("%d %d ",x,y);
printf("NO\n");
}
//return 0;
//}
}
Problem Link: GDTURN Problem - CodeChef
#include <stdio.h>
#include <stdlib.h>
int main() {
int i, x, y, n;
// declaring strings
char string1[4], string2[4];
scanf(“%d”, &n);
for(i = 0; i < n; i++) {
// taking the numbers from the user
scanf(“%s”, string1);
// skipping the enter key
scanf(“%s”, string2);
// converting into integers
x = atoi(string1);
y = atoi(string2);
if((x + y) > 6) {
printf(“YES\n”);
} else {
printf(“NO\n”);
}
}
return 0;
}
Hello, you did pretty well, and you just missed some type conversations.
Hope the above code will help you.
type or paste code here
```/* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
public static void main (String[] args)
{
Scanner sc= new Scanner(System.in);
int x,y,t;
t=sc.nextInt();
int Sum=0;
for(int i =0;i<t;i++){
x=sc.nextInt();
y=sc.nextInt();
Sum=x+y;
if(Sum > 6)
{
System.out.println("YES");
}
else
{
System.out.println("NO");
}
}
}
}