Flowchart sample 2
How to find profit or loss
In this problem the goal is to find whether Juan makes a profit or loss.
We know the Cost Price and the Selling Price. We can read them as input, so they are represented as parallelograms.
Next we have to compare Selling Price and Cost Price to find which price is more.
This will tell us whether Juan has made profit or loss.
How do we show comparison in a flowchart?
Can you phrase this step as a question with the two possible answers?
We can ask a question “Is selling price more than cost price?”
The answer to this question can be “Yes” or “No”. If, answer is “Yes” we have to calculate profit. If, answer is “No” we have to calculate loss. This decision taking step is represented as follows in a flowchart.
_____________________________________________________________________
If the answer is “Yes”, it means that selling price is more than the cost price and Juan has made profit. Profit is calculated as Selling price – Cost price.
______________________________________________________________________
If the answer is “No”, it means that cost price is less than selling price and Juan has made loss. Loss is calculated as Cost price – Selling price
We have used logical reasoning to solve this problem.
Now complete the flowchart.
This is how to draw basic flowchart program design. Do you think you can draw flowchart now?
Let’s try this!
Write an algorithm to convert the length in feet to centimeter.
Match the elements of a flowchart and their purpose of use in the following:
Purpose Use
Calculate total A, B, C Loop
Indicate that the problem has been solved Start
Find if the number is greater than the other Process
Read a number and calculate the factorial of a number Input
Read three numbers Stop
Print the Total Decision
Indicate beginning of the problem solving flow Output
Summary
This is how to draw flowchart for solving problems.
By looking at a Flowchart, one can understand the operations and sequence of operations performed in a system.
Share with your friends: |