Solved

Suppose the Variables X and Y in the Following Bare

Question 17

Short Answer

Suppose the variables X and Y in the following Bare Bones program have the values 3 and 2,respectively,when execution begins.What will be the value of Z when the program terminates?
_________
 clear Z while X not 0 :  decr X incr Z while Y not 0: decr Y incr Z\begin{array} { c } \text { clear } \mathrm { Z } \\\text { while } \mathrm { X } \text { not } 0 \text { : } \\\text { decr } \mathrm { X } \\\text { incr } \mathrm { Z } \\\text { while } \mathrm { Y } \text { not } 0 : \\\text { decr } \mathrm { Y } \\\text { incr } \mathrm { Z }\end{array}

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions