219k views
0 votes
C programming Write a function named CalculateSphereVolume that takes one integer parameter intDiameter. The function should calculate the volume of a sphere with the specified diameter using the following formula: V = 4/3 * Pi * r^3.

User Silka
by
3.2k points

1 Answer

5 votes

Answer:

not familiar with C++. but basically save the constant 4/3 in a variable and use user input of cin << i believe to ask for a radius. Then take that radius/input saved in a variable and cube it, then return the value.

Step-by-step explanation:

i hope this works.

User Eos
by
3.8k points