Tuesday, 4 October 2016

To find Ratio of Area of Circle when Diameter is doubled .

#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();
}

No comments:

Post a Comment

Basic Implementation of Array as a Pointer

#include<iostream.h> #include<conio.h> void main() { clrscr();   int arr[5];   cout<<"Enter 5 nos. ";   f...