105k views
0 votes
Define a class Sphere to input radius of a sphere and compute the volume of it. Volume = πr3 (where π=3.14)​

User Lucky Rana
by
5.0k points

1 Answer

6 votes

Lets use Python

Program:-


\tt r=(float(input(


\tt V=4/3*3.14*r**3


\tt print(

Output:-


\tt Enter\:the\:radius\:of\:the\:sphere=3


\t Volume\:of\:the\:Sphere=103.4

User Bjoernsen
by
5.3k points