0
Explain the meaning and output of each line of the following in the context of programming: (i) int i; int x,
(i)int i; int x, y, z=31; (ii) x = y / 2; (iii) z=x*2; (iv) if (z==y) (v) printf("y contains an EVEN number"); (vi) else printf("y contains an ODD number");
2 Respuestas
+ 2
i) declare variables and initialize it with value
ii) make a division and assign the result to variable x
iii) double this variable x and assign to z
iv - vi) forms a conditional sentence if-else
if (condition)
//instructions executed when condition evaluates to true....
else
//instructions executed when condition evaluates to false....
iv) So after do previous operations if z is equals to y,
v) print this message in console
vi) if not... print this another
If this solve your question remember mark this answer as valid
0
Thank you