Lecture3 - Programming in Programming in C Based on the...

Info icon This preview shows pages 1–9. Sign up to view the full content.

Programming in C Based on the Original Slides from Politehnica International- Computer Engineering Lecture Slides
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Outline Program Looping Th f St t t – The for Statement – Relational Operators Nested fo Loops – Nested for – Increment Operator Program Input – Program Input –for Loop Variants – The while Statement The while – The do Statement – The break Statement The – The continue Statement
Image of page 2
Program Looping • Looping: doing one thing over and over Looping: doing one thing over and over Program loop: a set of statements that is executed repetitively for a number of times Forms of controlling the program flow: – Executing a sequence of statements Executing a sequence of statements – Repeating a sequence of statements (until some condition is met) (looping) – Using a test to decide between alternative sequences (branching)
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.