1. Write an if-­statement that increases the variable num1 by one and reduces the variable num2 by 1, if the variables are not equal.

MY ANSWER:
int num1 = 11;
int num2 = 10;
int counter = 1;

If (num1 != num2)
{
Num2+ counter
}

If (num2 != num1)
{
Num1 - counter
}

IS IT CORRECT? can someone help.
Thanks

why two checks? If they are not equal, do both changes.

The way you have it, changing Num2 might make them equal, and the 2nd check will fail. In fact, the way you have initialized the variables, the 2nd check will definitely fail!