#include<iostream.h>
#include<conio.h>
void main ()
{
clrscr();
float d,a,D,A,ra;
cout<<“Enter the Diameter of the Circle “;
cin>>d;
float const Pi=3.14;
a=Pi*d*0.5*d*0.5;
D=2*d;
A=Pi*D*0.5*D*0.5;
ra=A/a;
cout<<“Area of the Circle = “<<a<<“\n”;
cout<<“Area of the Circle after diameter is doubled = “<<A<<“\n”;
cout<<“Ratio of the Area of smaller circle to bigger circle is = 1:”<<ra;
getch();
}
#include<conio.h>
void main ()
{
clrscr();
float d,a,D,A,ra;
cout<<“Enter the Diameter of the Circle “;
cin>>d;
float const Pi=3.14;
a=Pi*d*0.5*d*0.5;
D=2*d;
A=Pi*D*0.5*D*0.5;
ra=A/a;
cout<<“Area of the Circle = “<<a<<“\n”;
cout<<“Area of the Circle after diameter is doubled = “<<A<<“\n”;
cout<<“Ratio of the Area of smaller circle to bigger circle is = 1:”<<ra;
getch();
}
No comments:
Post a Comment