1 / 17

Visual Logic

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.

shadow
Download Presentation

Visual Logic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Visual Logic Chapter 4

  2. 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

  3. Step Value in For Loops

  4. For Loop with Negative Step Value Example

  5. Comparing While and For Loops • While • Explicit Initialization statement • Explicit Test Condition statement • Explicit Update statement • For • Automatically performs these three actions

  6. Comparison of While and For Loops

  7. Example

  8. NestedLoops • Loop contained inside the body of another loop

  9. Nested loop- Printing the values of outer loop and inner loop counters

  10. Printing “Hello” 16 times- Solution 1

  11. Printing “Hello” 16 times- Solution 2

  12. Multiplication Table Example

  13. Triangle Problem Example

  14. Some Graphics Drawing a Box

  15. More Box Demo

  16. Fun Box

  17. Twisted Box with Color

More Related