Solved

Suppose the Variable X in the Following Bare Bones Program  clear Y decr X while X not 0: decr X incr Y\begin{array} { l } \text { clear } Y \\\text { decr } X \\\text { while X not } 0 : \\\text { decr } X \\\text { incr } Y\end{array}

Question 5

Short Answer

Suppose the variable X in the following Bare Bones program has the value 3 when execution begins.
 clear Y decr X while X not 0: decr X incr Y\begin{array} { l } \text { clear } Y \\\text { decr } X \\\text { while X not } 0 : \\\text { decr } X \\\text { incr } Y\end{array}
A.What will be the value of X when the program terminates?

B.What will be the value of Y when the program terminates?

Correct Answer:

verifed

Verified

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

Related Questions