
50 Programming and Data Structures
The following program illustrates the use of various relational operators.
3.10 Write a program to read three variables x, y and z. Use conditional statements and
evaluate values of variables a, b and c. Perform the sum with two sets of variables.
Checks the sums for equality and prints different messages.
mainO
{i n t x , y ,z ,a ,b ,c ,m ,n ;
c l r s c r () ;
p r in tf ("E n ter Values o f x , y , z m) ;
scanf ("%d %d %d*, &x,&y,&z);
a*(x> *5 ? 3 : 4) ;
printf ("\n Calculated value of a is % d ”, a);
b=(y<=8 ? 10 : 9);
printf ("\n Calculated value ofb is%d", b); ...