Question #51030
A=10. WHILE (A<10){ PRINT "HI"; }. How many times will "HI" be printed by the program?

a. 10
b. 11
c. 1
d. 0
1
Expert's answer
2018-05-17T10:24:43-0400
“While”statement relates to the cycle statements with a precondition. If the precondition
is true the code in the brackets { } will be executed, otherwise – the code
will be missed.
A= 10;while(A<10)                       à  10 < 10 -- false, so the loop wouldn’t be executed{PRINT"HI";} Right answer is: D – 0 times.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS