Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ The formula to compute the area of a circle is area = PI * radius 2 so if a circles radius doubles (i.e. is

c++

The formula to compute the area of a circle is

area = PI * radius2

so if a circles radius doubles (i.e. is multiplied by 2), the circles area will be four times as large as before. Write a program that creates a table showing the radius and area for a circle whose radius begins with 1 and continues doubling until it is 8. Use 3.14156 for PI or to be more accurate with your answers use PI = acos(-1). You may need to include to use acos.

Use the following for your table heading (output once before the loop) if you like:

cout << " Circles " << "Radius Area " << "-------------- ";

and the following for the detail lines (one output per loop iteration):

cout << setw(4) << (your radius variable) << setw(9) << (computed area) << endl

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

1. Is this appropriate?

Answered: 1 week ago