Wednesday, 27 August 2014

Volume of Sphere solution in cpp

Leave a Comment
//Volume of Sphere (4/3) × pi × radius3
#include<iostream>
#include<math.h>
using namespace std;
static double pi=3.1415926535;
int main()
{
double radius,Ans;
cout<<"Enter Radius = ";
cin>>radius;
Ans=(4/3)*pi*pow(radius,3);
cout<<"Volume of Sphere = "<<Ans<<endl;
system("pause");
}
If You Enjoyed This, Take 5 Seconds To Share It