Executive summary

profiletihomir11
document_2.pdf

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 program that receive the values of three boolean varibles,a,b,and c,from standard input and

determines if the value of the condition !(xx || xx) &&xx

is false (if the condition is false)or

is true (if the condition is true).

3.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”;

4.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<b”;

else if (a is greater than b),

Print “a>b”;