My issue
could not understand the logic
My code
// Step 1: Read and understand the problem statement and sample test cases
// Click on 'Next' once you are ready to proceed.
import java.util.Scanner;
class CodeChef{
public static void main(String[] args){
Scanner read = new Scanner(System.in);
int t = sc.nextInt();
for(int i=0;i<3;i++)
{
int a=sc.nextInt();
int c=sc.nextInt();
int b;
if((a+c)/2 )
b = (a+c);
System.out.println(b);
}
}
}
Learning course: Java for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone