Please help me!

Write a C++ program that computes a pair of estimates of π, using a sequence of inscribed and circumscribed regular polygons. Halt after no more than 30 steps, or when the difference between the perimeters of the circumscribed and inscribed polygons is less than a tolerance of ε=10⁻¹⁵. Your output should have three columns, for the number of sides, perimeter of inscribed polygon, and perimeter of circumscribed polygon. For the last two columns, display 14 digits after the decimal point. Your program and the output should appear in a Scientific Workplace document. Comment on your results. Warning: You may find that the answers differ from your expectations.

I am really confused and do not know how to do it. Can somebody help me, please?
Please note, that this is not a homework site. We won't do your homework for you. The purpose of homework is that you learn by doing. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.

We didn't see your attempts to solve this problem yourself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again.


I don't know what "inscribed and circumscribed regular polygons" are, so I don't know how to calculate their perimeter, but I presume that you do know.
Topic archived. No new replies allowed.