Professional Documents
Culture Documents
Program Flowchart
Design tool commonly used in designing input, output and process flow of a program
Sequence
A sequential execution of process. Each instruction is executed in a serial manner, one after another
Selection
Provide a decision point that allows one of two choices to be chosen
Iteration
Repeat a set of instructions a number of times based on condition stated. This loop will end when condition has been fulfilled
Sequence Example:
Start
Get number1
Get number2
Display answer
Stop
Selection Example 1
Start Get number1
Get number2
yes
number2= 0?
Display answer
Stop
Selection Example 2
Start Display main menu
Get choice
choice =2?
no yes choice =3? no yes choice =4? no Stop
Iteration Example 1
Start
total = 0
Get number
Display total
Stop
Iteration Example 2
Start
i=1
i=i+1
Connector Example
A program to accept input of a series of numbers and total up value entered until 0 is entered. Then display number of data entered and total
Start Enter Number Yes Number = 0? Display N, Total Stop
N = N + A
Exercises
Draw a flowchart for a program which will output the total of a list of non-negative numbers input from the keyboard. The list of numbers is terminated with any negative number.
End of Slide