Question: You will be creating a main() function to practice basic loops, mathematical formula implementation, and basic outputs. You will submit ONE file on Canvas called

 You will be creating a main() function to practice basic loops,

You will be creating a main() function to practice basic loops, mathematical formula implementation, and basic outputs. You will submit ONE file on Canvas called LastName_Firstname_HW1B.cc (or .cpp). Instructions: 1. Start with a circle of radius = 1. 2. Circumscribe an equilateral triangle, (n = 3) around the circle 3. Circumscribe a circle around the triangle. 4. Circumscribe a square (n = 4) around the circle 5. Circumscribe a circle around the square. 6. Circumscribe a pentagon (n 5) around the circle. 7. Keep going until n = 1,000,000 (105) 8. Print out the circle radii for n = 10, 100, 1000, 10000, 100000, 106. Diagram showing the first two polygons (triangle, square) and the first three circles: r be 2 Example Output: n = 10 Radius XX.XXXXX n = 100 Radius XX.XXXXX n = 1000 Radius XX.XXXXX n = 10000 Radius XX.XXXXX n = 100000 Radius XX.XXXXX 106 Radius = XX.XXXXX (Where XX.XXXXX is the value) n = You will be creating a main() function to practice basic loops, mathematical formula implementation, and basic outputs. You will submit ONE file on Canvas called LastName_Firstname_HW1B.cc (or .cpp). Instructions: 1. Start with a circle of radius = 1. 2. Circumscribe an equilateral triangle, (n = 3) around the circle 3. Circumscribe a circle around the triangle. 4. Circumscribe a square (n = 4) around the circle 5. Circumscribe a circle around the square. 6. Circumscribe a pentagon (n 5) around the circle. 7. Keep going until n = 1,000,000 (105) 8. Print out the circle radii for n = 10, 100, 1000, 10000, 100000, 106. Diagram showing the first two polygons (triangle, square) and the first three circles: r be 2 Example Output: n = 10 Radius XX.XXXXX n = 100 Radius XX.XXXXX n = 1000 Radius XX.XXXXX n = 10000 Radius XX.XXXXX n = 100000 Radius XX.XXXXX 106 Radius = XX.XXXXX (Where XX.XXXXX is the value) n =

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!