Is the number positive or negative, or is it zero?
Problem : Write a flow chart for a program that asks a user for a number,
reads it, and tells you if it is positive or negative.
If the number is zero, display that. Be sure to include the original value
in the output.
Algorithm :
- Start
- Ask user for a number
- Input the number
- ask if the number is equal to 0
- if it is display "the number is zero"
- if it is not then :
- ask if the number is greater than 0
- if the answer is yes
- display the number is positive
- if the answer is no
- display the number is negative
- Stop
Flowchart :