Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program, circle.cpp, that inputs double radius of circle. It should print for given this radius, the circumference of the circle, the area of

image text in transcribed

Write a program, circle.cpp, that inputs double radius of circle. It should print for given this radius, the circumference of the circle, the area of the circle, the surface area of a sphere with that radius and the area of a sphere with that radius. Here are the formulas for computation: circumference 2 . ? . r Circle Area . r2 Sphere Surface Area 4 . ? . Sphere Volume4/3.t - r* Define a constant for t before main in your program const double pi 3.14159265358; You are required to write functions that do the following compute and return the circumference of a circle given the radius (parameter) compute and return the area of a circle given the radius (parameter) compute and return the sphere surface area given the radius (parameter) compute and return the sphere area given the radius (parameter) print the results given the values of the circumference, area, surface, and volume (four parameters, no return value) A sample run might be (user input in bold) Enter a radius: 7.5 Circumference Sphere Surface ...706.858 47.124 Sphere Volume 1767.146 The output should follow the format shown above (values printed with 3 digits after the decimal, in a field width of 10 characters)

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_2

Step: 3

blur-text-image_3

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

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions

Question

Draw and explain the operation of LVDT for pressure measurement

Answered: 1 week ago

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago