Title: Quiz: C++ Loops and If
Course: CPS 120: Introduction to Computer Science ~ Master (Aug/2015) OLD

Q: After execution of the following code, what is the value of width?

(count, I and width are of type int).  Show your work.

width = 15;

count = 3;

for (I = 1; I <= 7; I = I + 1)

{

if (width >=100)

width = width – 5;

else

width = count * width;

}