Wednesday, 27 August 2014

Area of Sphere (surface) solution in cpp

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