1. Determine whether the following conditions are True or False?
x = 4, y = 20, z = 3.
A) x < y+z, B) x-y>= 1, C) x != y, D) z >12 , E) !(x < 3) F) z-6 <= 6 , G) x<1 || y>5, H) z<1 && z >2.
Note: Solve this by hand and show the calculations.
2. Write a C++ program to check whether a number entered by user is even or odd.
Pseudo code:
Read the number n;
if (n is divisible by 2),
Print "n is even";
else
Print "n is odd";
3. Write a C++ program to relate two integers entered by user using == or > or < sign.
Pseudo code:
Read values of 2 numbers a ,b;
if (a is equal to b),
Print "a=b";
else if (a is less than b),
Print "a
else if (a is greater than b),
Print "a>b";