Tuesday, 4 October 2016

Program to find Area of a Circle when Diameter is Doubled .

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

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...