Question: For this prompt, I have written my C++ program but I am getting an error saying that sqrt was not declared in the scope also
3. Write a C++ program that will calculate and display the areas of some standard geometric figures. Specifically, the program needs to display the areas of the following geometric figures for length of side 1,2, 3, 4, 5, and 6 (36 total results). You need to have a separate area function for each geometric figure. Each function needs to "protect itself" from a violation of its precondition. Include appropriate inline comments for your code and output prompts a. equilateral triangle b. square c. regular pentagon d. regular hexagon e. regular heptagon f. regular octagon 35 36 areaOfEquTri (3)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
