1 / 7

- Meeting 7 – Looping

- Meeting 7 – Looping. By: Felix Valentin, MBA. Today Topic:. Understand the advantages of looping Looping Partice. Understand the advantages of looping. You can use a variable sentinel value to control a loop

sumi
Download Presentation

- Meeting 7 – Looping

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. - Meeting 7 –Looping By: Felix Valentin, MBA

  2. Today Topic: • Understand the advantages of looping • Looping Partice

  3. Understand the advantages of looping • You can use a variable sentinel value to control a loop • Sometimes it is convenient to reduce or decrement a loop control variable on every cycle through a loop • The two mistakes programmers make most often with loops are: • Neglecting to initialize the loop control variable • Neglecting to alter the loop control variable

  4. Understand the advantages of looping • All structured loops share these characteristics: • The loop controlling question provides either entry to or exit from the repeating structure • The loop controlling question provides the only entry to or exit from the repeating structure • When you must use loops within loops, you use nesting loops

  5. Looping Partice • Create a psecudo code for this application: n = 5 <- User Input -0- -00- -000- -0000- -00000-

  6. Looping Partice • Create a psecudo code for this application: n = 5 <- User Input Odd/Even = O <- User Input 2 4 6 8 10 n = 8 <- User Input Odd/Even = E <- User Input 1 3 5 7 9 11 13 15

  7. Looping Partice • Create a psecudo code for this application:

More Related