UNIT 4. CONDITIONAL STATEMENTS

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/12

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

13 Terms

1
New cards

Decision-Making Structure

  • Is the process of making a decision about which part of the code should be executed or not based on some condition.

2
New cards

Decision-Making Structure (2)

  • In C++ involves the usage of conditional statements to execute specific blocks of code primarily based on given situations and their results.

3
New cards

if structure

  • The _ _ is one of the selection structures that will execute the statement or block of statements following it when the comparison expression evaluates to true

4
New cards

if STATEMENT (2)

  • If the comparison expression evaluates to false, it will go out of the if structure without doing anything.

5
New cards

Syntax Statement (if STATEMENT)

knowt flashcard image
6
New cards

if-else STATEMENT

  • The if-else structure is a selection construct that will execute a statement or a block of statements when the condition evaluates to true or another series of instructions when the result of the comparison is false.

7
New cards

syntax statement (If-else STATEMENT)

knowt flashcard image
8
New cards

If-else-if ladder STATEMENT

  • helps the user decide from among multiple options. The C++ if statements are executed from the top down.

9
New cards

If-else-if ladder STATEMENT (2)

  • As soon as one of the conditions controlling the if is true, the statement associated with that if is executed, and the rest of the C++ _ _ _ is bypassed. If none of the conditions is true, then the next statement will be executed.

10
New cards

syntax statement (If-else-if ladder STATEMENT)

knowt flashcard image
11
New cards

nested if-else STATEMENT

  • are those statements in which there is an if statement inside another if-else.

12
New cards

nested if-else STATEMENT (2)

  • when we want to implement multilayer conditions (condition inside another condition, inside another condition, and so on). C++ allows any number of nesting levels.

13
New cards

switch STATEMENT

  • is an alternative for the if else if ladder structure. It looks for a match among the cases and executes the statements inside the match. If no match is found, it will execute the default statements.