Help me in solving LBCP01A problem

My issue

My code

#include<stdio.h>
int main()
{
    int A,C,B,t;
    scanf("%d",&t);
    {
        for(i=1;i<=t:i++)
        scanf("%d %d", &A, &C);
        {
         if()
        }
    }
}

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

@au_20eg112206
The logic is is both A and C are even or odd then answer should be B=(A+C)/2;
else answer would be -1;