Question: If x = 10 and y = 8, what will be displayed after the following statements have been executed? if x mod y <
If x = 10 and y = 8, what will be displayed after the following statements have been executed? if x mod y < y \ x then display "1" else if x + y x*2- 2 then display "2" else endif if x/2>y\2 then display "3" else endif Solact if x > y + 2 then display "4" else endif display "5" endif
Step by Step Solution
3.54 Rating (161 Votes )
There are 3 Steps involved in it
Lets break down the statements step by step 1 x 10 and y 8 2 if x mod y y x then display 1 else if xy x2 2 then display 2 else endif There seems to be a syntax error in the first conditional statement so lets correct it for interpretation Assuming the corrected statement is if x mod y y x then display 1 else if x ... View full answer
Get step-by-step solutions from verified subject matter experts
