

The Loop Structure
Presentation
•
Computers
•
11th Grade
•
Practice Problem
•
Medium
Leori Ignacio
Used 224+ times
FREE Resource
15 Slides • 9 Questions
1
The Loop Structure

2
Multiple Choice
An integer recognizes decimal numbers.
True
False
3
Multiple Choice
Which of the following is the correct way of writing a formula in C++?
sum = a + b
sum = a + b;
a + b = sum
4
Multiple Choice
Which of the following is the correct way of declaring an integer in C++?
int a;
Dim as Int
Dim as Integer
5
Multiple Choice
A loop statement is also known as an iterative statement.
True
False
6
Multiple Choice
It is the keyword that carries a conditional statement.
If
Then
Else
End If
7
LOOPING STATEMENTS
It is also known as ITERATIVE STATEMENTS.
ITERATION is the process where a set of instructions or statements is executed repeatedly until a condition is met.
Iterative statements also alter the control flow of the program and can be classified as control statements.
8
LOOPING STATEMENTS
A loop basically consists of three parts:
Initialization
Condition
Modification
9
PARTS OF LOOPING STATEMENTS
INITIALIZATION - it is an assignment statement that is used to set a loop control
CONDITION - the relational expression that determines when the loop will end by testing the loop control variable against some value.
MODIFICATION - it defines the loop control variable that will change each time the loop is repeated.
10
Multiple Choice
It is a loop structure wherein the initialization, condition and modification are written in a single statement
For Loop
Do-While
While
11
FOR LOOP
Syntax:
for (initialization; condition; modification)
{execution statements}
12
FOR LOOP
13
FOR LOOP
FOR LOOP is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times.
It is the most commonly used looping technique. The reason, why it is so popular, is because it has all three parts of the loop: initialization, condition, and modification in the same line.
14
Multiple Choice
It is a loop structure that continues the execution of the loop if the condition is true, and the initialization is written at the declaration area.
For
While
Do-While
15
while LOOP
Syntax:
initialization
while (condition)
{execution statements}
16
while LOOP
17
while LOOP
A control structure that allows you to repeat a task a certain number of times.
A while loop will continue its execution of the loop if the condition is TRUE but will stop if the condition is already false.
18
Multiple Choice
It is a loop structure in which the condition is written at the end of the loop statement.
For
While
Do-While
19
Multiple Choice
It is a loop structure in which the execution is guaranteed to perform at least one time.
Do Loop While
For While
Do-While Loop
20
do-while LOOP
Syntax:
initialization
do
{execution statements}
while (condition)
21
do-while LOOP
22
do-while LOOP
do-while is similar to while except that it is guaranteed to execute at least one time.
The conditional expression appears at the end of the loop, so the statement(s) in the loop executes once before the condition is tested.
23
C++ NESTED LOOP
A loop can be nested inside another loop. C++ allowsat least 256 levels of nesting.
24
JUMP STATEMENTS
Unconditionally transfer program control within a function.
goto statement – allows jumping to another point in the program.
break statement – when executed in a switch structure,provides an immediate exit from the switch structure.
continue statement – used in loops and causes a program toskip the rest of the body of the loop.
The Loop Structure

Show answer
Auto Play
Slide 1 / 24
SLIDE
Similar Resources on Wayground
19 questions
Inverse Functions
Presentation
•
11th Grade
19 questions
Muscles Intro
Presentation
•
11th Grade
20 questions
Mixed Numbers
Presentation
•
4th - 5th Grade
18 questions
Figurative Language
Presentation
•
11th Grade
18 questions
El amor 1. Thich y Eterno resplandor
Presentation
•
KG
21 questions
Chromebook Tips Lesson
Presentation
•
12th Grade
17 questions
Significant Figures
Presentation
•
11th Grade
21 questions
Creative iMedia LO2 Legislation
Presentation
•
10th - 11th Grade
Popular Resources on Wayground
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade