Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

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. 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;
eturn (volum);
}
XXXXXXXXXXWrite a program that uses the function volume_of_sphere (float radius) to calculate the
XXXXXXXXXXdifference in volume between two spheres. The first sphere has a radius of 5.5 and the
XXXXXXXXXXsecond 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 XXXXXXXXXX32
XXXXXXXXXX
XXXXXXXXXX
… …
XXXXXXXXXX
XXXXXXXXXXSee the conversion table at the end of problem 4. You should use a void function or a
XXXXXXXXXXregular function.
Answered Same Day Dec 14, 2021

Solution

Sudipta answered on Dec 14 2021
137 Votes
Ans 1.)
#include
its/stdc++.h
using namespace std;
float volume_of_sphere(float radius)
{
    float 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