#include<iostream>#definepi3.1415926535usingnamespace std;intmain(){int n;double r,h;while(1){
cout<<"1-Ball"<<endl<<"2-Cylinder"<<endl<<"3-Cone"<<endl<<"other-Exit"<<endl<<"Please enter your command:"<<endl;
cin>>n;if(n==1){
cout<<"Please enter the radius:"<<endl;
cin>>r;printf("%.2lf\n",4*pi*r*r*r/3);}elseif(n==2){
cout<<"Please enter the radius and the height:"<<endl;
cin>>r>>h;printf("%.2lf\n",pi*r*r*h);}elseif(n==3){
cout<<"Please enter the radius and the height:"<<endl;
cin>>r>>h;printf("%.2lf\n",pi*r*r*h/3);}elsebreak;}return0;}