Wyo Visual Basic
Ch. 5 Worksheet #4
Name -

Deskcheck the following Do While loops, tracing the intermediate values of all loop variables. Neatly label columns on the right side of this worksheet to show the intermediate values each variable. Place single slashes through intermediate values except for the last value. Assume that all variables are initialized to zero. Also indicate how many beeps would sound with each exercise. Indicate if any loop is infinite or if it never iterates even one time.

1.

Do While (intLoop1 < 5)
   intLoop1 = intLoop1 + 1
   Beep
Loop

2.

 intCounter2 = 200
intNum2 = 2
0

Do While (intCounter2 >= 100)
     intCounter2 = intCounter2 - 2 * intNum2
     Beep
Loop

3.

intCounter3 = -10
intNum3 = 15

Do While (intCounter3 < 60)
    intCounter3 =intCounter3 + intNum3
    intNum3 = intNum3 - 2
    Beep
Loop

4.

intLoop4 = 10
intNum4 = 2

Do While (intLoop4 < 50)
    intLoop4 =intLoop4 + 5
    intNum4 = intNum4 - 4
    Beep
Loop