//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");
}
#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");
}
0 Questions:
Post a Comment