Calculate the surface area and volume of the sphere finally


Write a function which calculates the surface area and the volume of a sphere. The variables srface area and the volume should be pointer type. Once the radius of the sphere and other necessary variables are passed from the main function, the separate function you wrote should calculate the surface area and volume of the sphere. Finally  the surface area and the sphere should be printed onto the screen. The printing statements

should be done inside the main function.

Hint: surface area of a sphere = 4????2, volume of a sphere =

4

3

????3, also use a similar

approach as in the case of calculating the surface area and the circumference of a disc

given in Pointers lecture slides (slides #23 &24).

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Calculate the surface area and volume of the sphere finally
Reference No:- TGS01371162

Now Priced at $20 (50% Discount)

Recommended (90%)

Rated (4.3/5)