1. Consider the function given below. float volume_of_sphere (float radius) { float volum; const float pi = XXXXXXXXXX; volum = (4.0/3.0)*pi*radius*radius*radius; return (volum); } XXXXXXXXXXWrite a...

1 answer below »
1-Write each program according to the problem statement.2-Include the source code and output file according to the sample data given in the problem.


1. Consider the function given below. float volume_of_sphere (float radius) { float volum; const float pi = 3.14159; volum = (4.0/3.0)*pi*radius*radius*radius; return (volum); } Write a program that uses the function volume_of_sphere (float radius) to calculate the difference in volume between two spheres. The first sphere has a radius of 5.5 and the second sphere has a radius of 3.3. 2. Write a program that uses a loop to print a Celsius / Fahrenheit conversion table such as the following: Celsius Fahrenheit 0 32 10 50 20 68 … … 100 212 See the conversion table at the end of problem 4. You should use a void function or a regular function.
Answered Same DayDec 14, 2021

Answer To: 1. Consider the function given below. float volume_of_sphere (float radius) { float volum; const...

Sudipta answered on Dec 14 2021
136 Votes
Ans 1.)
#include
using namespace std;
float volume_of_sphere(float radius)
{
    fl
oat volum;
    const float pi=3.14159;
    volum = (4.0/3.0)*pi*radius*radius*radius;
    return volum;
}
int main()
{
    float vol_1=volume_of_sphere(5.5);
    float vol_2=volume_of_sphere(3.3);
    float...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here