Basic Programming
Ch. 5 Exercises, Page 1
For/Next loop deskchecking exercises
Neatly deskcheck the following exercises. Keep a running list of the values of each variable and show the printed output on the computer screen. Be sure to use single slashes through past values of variables.
1. (be sure to follow the order of operations)
For r = 1 To 3
Print (r + 3)
For c = 1 To 2
Print r - c * 2
Next c
Next r
2.
g = 2
For m = 1 To 2 Step 0.5
OldAmount = g
For g = 4 To 2 Step -0.5
NewAmount = g - OldAmount
Print NewAmount
Next g
Next m
Return to Ch. 5 Resources Page
Basic Programming Home Page | Mr. Minich's Wyo Home Page | Minich.com Web Design