Laasya 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) × π × 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.
#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
Input_2:
Radius : 3.1
Output:
Volume : 124.724976
Input_3:
Radius : 5.2
Output:
Volume : 588.678772
Input_4:
Radius : 1.22
Output:
Volume : 7.602351
Input_5:
Radius : 1
Output:
Volume : 4.186667
ILLUSTRATION OF THE OUTPUT :
More Q
- Determine if a person could attend all meetings in given interval times.
- Find the volume of a volley ball
- Find the maximum score obtained at the end of colour chess grid game.
- Find the number of pairs if positive integers with condition is even.
- Return the largest subset such that every pair meets the given condition.
- Find the number of index triplets that satisfy given condition.
- Handling multiple queries using array – sum, update, range.
- Find all the sequences that occur more than once in DNA molecule.
- Find the biggest number.
- Sum of cube of each number is again equal to the number then it is an Armstrong number.
- Hello World.
- Calculate the Cube Root.
- Find the count of consecutive 1’s present in array.
- Return an array with athletes relative ranks according to the score.
- Return a string of its base 7 representation.
- Return kth largest element in sorted order.
- Find all repeated elements in the array.
- Find atleast one duplicate number in the array.
- Find the maximum result of = a XOR b.