Write an algorithm for a flowchart diagram (shown below) to produce the shape created by rotating the arc n times. Match the following A, B, C, and D with the correct algorithms in the flowchart diagram.
Your algorithm and flowchart should specify:
1. What are the initial variable names and their values?
2. When should values be printed?
3. What increases or decreases?
4. How does one variable relate to another? Is there a formula for this?
5. When and how to repeat?
6. When to stop?
Start
n = 1
Angle = 0
A
B
No
YES
D
Flowchart part A - Flowchart part B - Flowchart part C - Flowchart part D
I. Print n and Angle
II. Is n = 4?
III. Is n < 4?
IV. n = n + 1, Angle = 90(n - 1)
V. n = n - 1, Angle = 90(n + 1)
VI. End
VII. Is n > 4?
VIII. n = n + 1, Angle = 90(1 - n)