Parking fee flowchart
Computes a parking fee from entry and exit times: 30 minutes free, then 1,000 won per 10 minutes, capped at 20,000 won a day.
The diagram
Reading it step by step
- 1. Start at 'Start'.
- 2. 'Read entry and exit time' is an input or output. Next: 'Compute minutes parked'.
- 3. 'Compute minutes parked' is a processing step. Next: '30 minutes or less?'.
- 4. Decide '30 minutes or less?': if 'yes', go to 'Fee 0'; if 'no', go to 'Fee ← ceil((minutes - 30) / 10) × 1,000'.
- 5. 'Fee 0' is a processing step. Next: 'Print fee'.
- 6. 'Print fee' is an input or output. Next: 'End'.
- 7. End at 'End'.
- 8. 'Fee ← ceil((minutes - 30) / 10) × 1,000' is a processing step. Next: 'Fee > 20,000 ?'.
- 9. Decide 'Fee > 20,000 ?': if 'yes', go to 'Fee ← 20,000'; if 'no', go to 'Keep the fee'.
- 10. 'Fee ← 20,000' is a processing step. Next: 'Print fee'.
- 11. 'Keep the fee' is a processing step. Next: 'Print fee'.
Shape by shape
| Shape | Symbol | Connections |
|---|---|---|
| Start | Terminator | → Read entry and exit time |
| Read entry and exit time | Input/output | → Compute minutes parked · ← Start |
| Compute minutes parked | Process | → 30 minutes or less? · ← Read entry and exit time |
| 30 minutes or less? | Decision | → Fee 0(yes), Fee ← ceil((minutes - 30) / 10) × 1,000(no) · ← Compute minutes parked |
| Fee 0 | Process | → Print fee · ← 30 minutes or less? |
| Fee ← ceil((minutes - 30) / 10) × 1,000 | Process | → Fee > 20,000 ? · ← 30 minutes or less? |
| Fee > 20,000 ? | Decision | → Fee ← 20,000(yes), Keep the fee(no) · ← Fee ← ceil((minutes - 30) / 10) × 1,000 |
| Fee ← 20,000 | Process | → Print fee · ← Fee > 20,000 ? |
| Keep the fee | Process | → Print fee · ← Fee > 20,000 ? |
| Print fee | Input/output | → End · ← Fee 0, Fee ← 20,000, Keep the fee |
| End | Terminator | ← Print fee |
Symbols used here
| Symbol | Meaning |
|---|---|
| Terminator | Where the flow starts or ends; a rounded rectangle. |
| Process | One action such as a calculation; a rectangle. |
| Decision | A question whose answer picks the next path; a diamond. |
| Input/output | Data comes in or goes out; a parallelogram. |
| Flow line | The order of steps, in the arrow direction. |
Diagram text
Paste this text into the editor to get the same picture, then change the names to fit your own work.
# Parking fee flowchart
flowchart TD
s(["Start"])
a[/"Read entry and exit time"/]
b["Compute minutes parked"]
c{"30 minutes or less?"}
d["Fee 0"]
e["Fee ← ceil((minutes - 30) / 10) × 1,000"]
f{"Fee > 20,000 ?"}
g["Fee ← 20,000"]
h["Keep the fee"]
o[/"Print fee"/]
z(["End"])
s --> a
a --> b
b --> c
c -->|yes| d
c -->|no| e
e --> f
f -->|yes| g
f -->|no| h
d --> o
g --> o
h --> o
o --> z