Loading video...
Loops
- Loops, or repetition statements, repeat blocks of code without the programmer having to re-type them
- Loops usually use Counters to count the number of times the loop has run
- Counters usually use Increment and Decrement operators to add or subtract from the counter total
- A loop Sentinal is a signal to the program that the loop should break
- A continue statement skips the remaining statements in loop body and proceeds with the next iteration of the loop
Loops
Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.
- Intro
- Types of Loops
- Increment and Decrement Operators
- Counters vs. Sentinels
- Break & Continue Statements
- While Loop Syntax
- For Loop Syntax
- Example 1: Calculate Commissions for Sales Staff
- Example 2: Program Calculates Average Miles Per Gallon
- Example 3: Find the Smallest of Entered Numbers
- Example 4: Return the Lyrics to 'The 12 Days of Christmas'
- Example 5: Do While Setup
- Example 6: Break Loop Statement Example
- Example 7: Continue Loop Statement Example

































Start Learning Now
Our free lessons will get you started (Flash® 10 required).
Sign up for Educator.comGet immediate access to our entire library.
Features Overview