Lecture16 Loops

Lecture16 Loops - Course:ProgrammingForEngineers1 Asma...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
FAST, National University of Computer and Emerging Sciences, Islamabad 1 Lecture 16: Loops      Course: Programming For Engineers-1 Asma Ahmad
Background image of page 1

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

View Full DocumentRight Arrow Icon
Control Structures Sequential execution Statements executed in order (from first to last sequence) . Transfer of control Next statement executed not next one in sequence. 3 control structures Sequence structure Programs executed sequentially by default Selection structures (conditional instructions) if, if/else, switch Repetition structures (loop/jump instructions) while, do/while, for
Background image of page 2
Loops The versatility of computer lies in its ability to perform a set of instructions repeatedly This involves repeating some portion of the program either a specific number of time or until a particular condition is being satisfied This is done through a loop control structure
Background image of page 3

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

View Full DocumentRight Arrow Icon
Loops C supports three methods to repeat a set of statements while loop for loop do while loop
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/21/2011 for the course EE 1 taught by Professor Shahidanwar during the Spring '10 term at NUCES.

Page1 / 28

Lecture16 Loops - Course:ProgrammingForEngineers1 Asma...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online