Flowchart: odd or even
Read an integer n. If the remainder of n divided by 2 is 0, print even. Otherwise print odd.
Steps
- Start, then read an integer n.
- Decide whether the remainder of n divided by 2 is 0.
- If it is 0, print even. If not, print odd.
- Finish at the end symbol.
Good to know
- Negative numbers work the same way. The sign of a remainder differs between languages, so the chart only checks for 0.
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.