









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A part of the ise105 computing fundamentals course on docsity.com. It covers the essentials of repetition in c programming, including counter-controlled repetition and the use of for and do-while loops. The document also introduces the switch statement, break and continue statements, and logical operators.
Typology: Slides
1 / 16
This page cannot be seen from the preview
Don't miss anything!
.
.
Outline 4.1 Introduction 4.2 The Essentials of Repetition 4.3 Counter-Controlled Repetition 4.4 The for Repetition Statement 4.5 The for Statement: Notes and Observations 4.6 Examples Using the for Statement 4.7 The switch Multiple-Selection Statement 4.8 The do…while Repetition Statement 4.9 The break and continue Statements 4.10 Logical Operators 4.11 Confusing Equality (==) and Assignment (=) Operators 4.12 Structured Programming Summary
.
4.1 Introduction
.
4.2 The Essentials of Repetition
.
4.3 Essentials of Counter-Controlled Repetition
int counter = 1; // initialization while ( counter <= 10 ) { // repetition condition printf( "%d\n", counter ); ++counter; // increment }
.
fig04_01.c
Program Output 1 2 3 4 5 6 7 8 9
10
.
fig04_02.c
.
4.4 The for Repetition Statement
.
4.4 The for Repetition Statement
.
4.5 The for Statement : Notes and Observations
.
fig04_05.c
Program Output Sum is 2550