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