{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

8.Selection(A) - Control Structures(Selections Topics to...

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

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

Unformatted text preview: Control Structures (Selections) Topics to cover here: Selection statements in the algorithmic language: • One-Way Selection • Two-Way Selection • Multi-Way Selection • Nested Structures • Selection statements in C++ language Selections .. cont. • The selection statement allows to choose a set of statements for execution. • The selection depends on the validity of a condition when the program is executed. • The condition is a logical expression that has values as true or false . One-Way Selection IF .. END IF statement (in pseudo code): • Syntax: IF ( condition) THEN statements END IF • The semantics (execution) of this statement :- If the value of the “condition” is true , the statements between IF .. END IF are executed and the execution continues to the statement after END IF.- If the value of the “condition” is false , the statements between IF .. END IF are ignored and the execution continues from the statement that follows END IF. The following figure shows the execution of this selection statement....
View Full Document

{[ snackBarMessage ]}

Page1 / 16

8.Selection(A) - Control Structures(Selections Topics to...

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

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