//Area of Torus (surface) pi2 × (radius22 - radius12)
#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;
cout<<"Enter Radius 2 = ";
cin>>radius2;
Ans=pow(pi,2)*(pow(radius1,2)-pow(radius2,2));
cout<<"Area of Torus (surface) = "<<Ans<<endl;
system("pause");
}
0 Questions:
Post a Comment