{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Control Structure - Control Structures Selection Statements...

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

View Full Document Right Arrow Icon
Control Structures Selection Statements If If-else Nested if-else Switch Conditional Expressions
Background image of page 1

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

View Full Document Right Arrow Icon
Structured Programming A structured programming is written using simple control structures to organize the solution to a problem. A simple structure is usually defined to be a sequence , a selection , or a repetition .
Background image of page 2
Structured Programming A sequence contains steps that is performed one after another. A selection structure contains a condition that can be evaluated true or false If True , one set of statements is executed If False , another set of statements is executed A repetition structure contains a set of steps that is repeated as long as a condition is true .
Background image of page 3

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

View Full Document Right Arrow Icon
Structured Programming Sequence Selection Repetition yes no yes no
Background image of page 4
Selection Statements if if else switch
Background image of page 5

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

View Full Document Right Arrow Icon
Flowcharts for if statements
Background image of page 6
If statement allows some code to be skipped or alternate code executed depending on the condition .
Background image of page 7

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

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}