180 likes | 344 Views
Visual Logic. Chapter 4. For Loops. Used to automate the initialize , test , and update process. . Count a to b by c . Count a to b. a: Initialize b: Test Step = 1. a: Initialize b: Test c: Step. Step Value in For Loops. For Loop with Negative Step Value Example.
E N D
Visual Logic Chapter 4
ForLoops • Used to automate the initialize, test, and update process. Count a to b by c Count a to b a: Initialize b: Test Step = 1 a: Initialize b: Test c: Step
Comparing While and For Loops • While • Explicit Initialization statement • Explicit Test Condition statement • Explicit Update statement • For • Automatically performs these three actions
NestedLoops • Loop contained inside the body of another loop
Nested loop- Printing the values of outer loop and inner loop counters
Some Graphics Drawing a Box