CHE110-L13 - For Loops CHE110 Introduction to Programming...

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

View Full Document Right Arrow Icon
Department of Chemical Engineering For 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
Background image of page 2
Department of Chemical Engineering For Loops For Loops are used when the number of loop passes are known before the loop is executed. For counter = start To end Step stepval [instructions] Next counter • Integer or Long variable • Automatically incremented • start = counter value in first pass
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
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

CHE110-L13 - For Loops CHE110 Introduction to Programming...

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

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