Problem Description: Laasyo bought a new volleyball in the sports shop. It looks like a medium size. She somehow found the radius of the sphere. But she would like to know the volume of that ball. Can you help him in finding the volume of the ballë Functional Description: Volume = (4.0/3.0] X IT x r3 IT = 3:14 Consirain 1.00 45.00 Input Format : The only line of input has a single value of type float representing the radius of the ball. Output Format Print the volume of the ball in a single line.
Answers
Explanation:
A sphere is a perfectly round geometrical object in three-dimensional space that is the surface of a completely round ball.
In three dimensions, the volume inside a sphere is derived to be V = 4/3*π*r3 where r is the radius of the sphere
Functional Description:
Volume = (4.0/3.0) × π × r^3
π = 3.14
Constraint: 1.00 ≤ r ≤ 5.00
Input Format :
The only line of input has a single value of type float representing the radius of the ball.
Output Format:
Print the volume of the ball in a single line
// C code to print the Volume of the ball in a single line
#include <stdio.h>
#include <math.h>
int main()
{
float radiusofball,volumeofball;
float PI=3.14;
//printf("Radius : ");
scanf("%f",&radiusofball);
volumeofball=(4.0/3.0)*PI*radiusofball*radiusofball*radiusofball;
//printf("Volume : ");
printf("%f",volumeofball);
return 0;
}
Input_1:
Radius: 2.56
Output:
Volume: 70.240608
#SPJ1
learn more:
https://brainly.in/question/961047