226k views
3 votes
Write a an algorithm to find out volume?​

User Mwright
by
4.7k points

1 Answer

6 votes
This for the algorithm of a sphere:
Define the radius of the sphere.
Define the pie and assign (22/7)
Calculate the volume of the sphere as (4/3)*pie*r3
Assign the volume of the sphere to volume_of_sphere.
Print the volume of the sphere.
User Protob
by
6.0k points