CHE110-L14 - Do While Loops CHE110 Introduction to...

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

View Full Document Right Arrow Icon
Department of Chemical Engineering Do While Loops CHE110 Introduction to Programming & Problem Solving
Background image of page 1

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

View Full DocumentRight Arrow Icon
Department of Chemical Engineering Introduction to Loops •A Loop is a construct that consists of code that is repeatedly executed . • Examples where loops would be useful. x x o x 1 x 2 x 3 Iterative Procedures () 2 ii f 1 xt x vt a t 2 t0 , t , 2 t t =+ + Δ Spatial/Temporal Profiles n 2 jj j1 xy x = Δ Summations x 2 0 d x For loops Do While loops
Background image of page 2
Department of Chemical Engineering Do While Loops Do While Loops are used when the number of loop passes are unknown before the loop is executed. Do While condition [instructions] Loop • executed while condition is true • may never be executed • executed while condition is true • executed at least once Do [instructions] Loop While condition
Background image of page 3

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

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

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

View Full DocumentRight Arrow Icon
Background image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/08/2009 for the course CHE 101 taught by Professor Coronel during the Spring '06 term at Rose-Hulman.

Page1 / 6

CHE110-L14 - Do While Loops CHE110 Introduction to...

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

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