Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C program Problem: Given from the user a radius value representing the lowest (#1 ) of three spheres used to create a snowman and as

C program image text in transcribed
Problem: Given from the user a radius value representing the lowest (#1 ) of three spheres used to create a snowman and as was the case in the first lab assignment you'd again like to make the middle (#2) sphere to have a radius that is half of the largest sphere with a top (#3) sphere radius that is half of the middle sphere. Calculate and display the radius, circumference, surface area, and volume for each sphere and the total combined volume and surface area of all three spheres. With the additional requirement to implement user-defined functions, functions should be designed to reduce the duplicate of similar code and to reflect the ability to reuse functions. Each user-defined function should represent a single task in your larger program. The failure to make a good use of user- defined functions as described in lecture and in the course standards will result in a loss of points. Example Execution #1 : Please enter the value of the largest radius -> 10 Radius #1 is: circumference #1 is: 62.83 Surface Area #1 is: 1256.64 volume #1 is: 10.00 4188.79 Radius #2 is: Circumference 42is:31.42 Surface Area #2 is : 314.16 volume #2 is: 5.00 523.60 Radius #3 is: Circumference #3 is: Surface Area #3 is: volume #3 is: 2.50 15.71 78.54 65.45 Total Volume: Total Surface Area: 4777.84 1649.34 Additional Notes: . The input will be non-negative floating-point data. . All floating-point values are to be of the double type. . Use M PI from math.h . The proper use of user-defined functions is a requirement of this assignment and all future assignments. . Course standards prohibit the use of programming concepts not yet introduced in lecture. For this assignment you can only consider material in the first 4 chapters of the book, notes, and lectures. Use of advanced programming constructs beyond this material would result in a loss of points

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

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions