WAP to enter two radius and find the ratio of area of circle when radius is doubled.

#include<iostream.h>
#include<conio.h>
void main()
{
  int a,b,c,d,e,f,g;
  clrscr();
  cout<<"Enter the radius of bigger circle:";
  cin>>a;
  cout<<"Enter the radius of smaller circle:";
  cin>>b;
  f=2*a;
  g=2*b;
  c=3.14*f*f;
  d=3.14*g*g;
  cout<<"Area of first circle when the radius is doubled is:"<<c;
  cout<<"\n"<<"Area of second circle when the radius is doubled is:"<<d;
  e=c/d;
  cout<<"\n"<<"Ratio of smaller with bigger circle is 1:"<<e;
  getch();
}

Comments

Popular Posts