Help me in solving LBJ201C problem

My issue

how to make even+even=even,odd+odd=odd.

My code

// Once the observations / logic is clear, click on 'Next' to continue.import java.util.scanner;
import java.util.scanner;
class average
    public static void main(String args[]);
    scanner read=new scanner(;
    int t=read.NextInt();
    for(int i=0;i<t;i++)
        int a=read.NextInt();
        int c=read.NextInt();
        int avg=(a+c)/2;
        if (Integer.parseInt(avg))

Learning course: Java for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone

U can have valid average when u will get an even number as a sum of two numbers .
and u get an even number as a sum of two number , the two number should be both of same parity either both should be even or both should be odd , for else cases u will always get an odd number as a sum of two numbers.