U M
U M
CLASS FY IT2
ROLL NO.24103043
}
//Function to calculate the volume of a cylinder
double volume(double radius,double height){
return M_PI*pow(radius,2)*height;
}
int main(){
double radius,height;
int side;
return 0;
}
OUTPUT:-
sdl@sdl4:~$ g++ s.cpp
sdl@sdl4:~$ ./a.out
Enter the side length of the cube:15 6
Volume of the cube:3375
Enter the radius and height of the cylinder:10
Volume of the cylinder:1130.97
Enter the radius of the sphere:6
Volume of the sphere:904.779
sdl@sdl4:~$