Help me in solving LBCP01 problem

My issue

How can I test if an integer is integer?

My code

// Update the program below to solve the problem

#include <stdio.h>

int main()
{
    int t;
    scanf("%d", &t); // Use scanf instead of cin in C
    int i=1;
    while (t>=i)
    {
        int A, B, C;
        scanf("%d %d", &A, &C); // Use scanf instead of cin in C
        B=(A+C)/2;
        if()

    }

    return 0;
}

Learning course: Logic Building in C
Problem Link: CodeChef: Practical coding for everyone

if remainder of (A+C)/2 is 0 then B is an integer .
this is my code :

include <stdio.h>
int main()
{
int t;
scanf(ā€œ%dā€, &t); // Use scanf instead of cin in C

while (t--)
{
    int A, B, C;
    scanf("%d %d", &A, &C); // Use scanf instead of cin in C
    B=(A+C)/2;
    if((A+C)%2==0)
    printf("%d\n",B);
    else 
    printf("-1\n");

}

return 0;

}