Vous êtes sur la page 1sur 6

# Flowchart Practice Decisions

Scenario 1:
Read two numbers as Input, multiply them together and Output the result if it is positive
(greater than 0).
START

Input two
numbers

## Multiply the two number

Is the
YES Output the
result
result
positive?

NO

END
Scenario 2:
Multiply the result by the third number
OUTPUT the final result if it is greater than 100
Otherwise output the first number

START

Input 3 numbers

third number

Is the final
result greater
than 100?

NO YES

## Display the first Display the

END
Scenario 3:
Read two numbers as INPUT and OUTPUT the smaller (lesser) of the two
START

Input two
numbers

## Set the smaller number to A

Display A

END
Scenario 4:
Read two numbers as INPUT and OUTPUT the greater of the two

START

Input two
numbers

## Set the bigger number to A

Display A

END
Scenario 5:
Read three numbers as INPUT A, B, and C and OUTPUT the greatest of the three

START

Input Number
A, B, and C

## NO Is B > C? NO Is A > B? YES Is A > C? YES

Display C Display A

YES NO

Display B Display C

END
Scenario 6:

A program that will check the age of a person and display the following messages:
a. If age < 18 Output message: “Junior Ticket”
b. If age > 60 Output message: “Senior Ticket”
c. Else Output message: “Regular Ticket”

START

## NO User’s NO User’s Age < 18? YES

Display “Junior Ticket”
Age > 60?

YES

END