Flowchart: find the larger of two numbers
Read two numbers a and b, then print the larger one. One decision symbol splits the flow into two paths.
Steps
- Start, then read two numbers a and b.
- Decide whether a is greater than b.
- If it is, print a. If not, print b.
- Both paths meet at the end symbol.
Good to know
- If the two are equal, the flow takes the No path and prints b. The value is the same either way.
- Label every line that leaves a decision symbol with Yes or No.
Drawing happens in this browser only. Your text is never sent to a server. Symbol rules differ a little between textbooks, so check them against your course before you hand in.