Flowchart: Print Pattern (1 to n per row)
Pattern:
12
123
1234
12345
Flowchart Steps:
1. Start
2. Initialize i = 1
3. Repeat while i <= 5:
a. Initialize j = 1
b. While j <= i:
i. Print j
ii. Increment j
c. Print newline
d. Increment i
4. End
Flowchart Symbols:
- Oval: Start/End
- Rectangle: Process (e.g., i = 1, j = j + 1)
- Diamond: Decision (e.g., i <= 5?)
- Parallelogram: Output (e.g., Print j)
Flowchart Layout:
[Start]
i=1
+----------------+
| i <= 5 ? |<----------------+
+-------+--------+ |
| Yes | No
v [End]
j=1
+----------------+
| j <= i ? |<----------+
+-------+--------+ |
| Yes |
v |
Print j |
j=j+1 |
| |
+--------------------+
Print newline
i=i+1
+--------------------------+