Question
Write a single function that draws on the console a regular polygon with n sides where n is passed in when the function is called
Write a single function that draws on the console a regular polygon with n sides where n is passed in when the function is called from main(). I have provided a template C++ program for you to start with. I have also provided an image with regular polygons with 3 to 10 sides, however your function should only draw one polygon with the number of sides passed into it when called.
- Make sure the bottom most side of the polygon is horizontal with your computer screen.
- Every polygon must have a constant radius of 100
- You are not allowed to use any other libraries other than what I have provided.
- Code must be your own that you developed yourself. It would be wise to show me any scratch paper work that was necessary for you to reach your solution.
- You are permitted to use any built in functions provided in the cmath library.
- Comment your code and make sure you are able to describe how it works.
- Submit the final .cpp file here.
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 #includeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started