Question: Consider the following code. val = 10; count = 1; do { val = val - count; count = count + 1; print (val); while
Consider the following code.
val = 10;
count = 1;
do {
val = val - count;
count = count + 1;
print (val);
while (val 0)
- How many times is the while loop executed?
- What is the value of val after the termination of the while loop?
- What values are printed?
*** Please show your work, step by step. Thank you ***
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
