Write a program in C++ to accept the radius of circle and display area of the circle as output. - WAY2IT

Latest Post :

Write a program in C++ to accept the radius of circle and display area of the circle as output.




Code :-

#include<iostream.h>
#include<conio.h>
#define PI 3.14 //define a constant
//program to calculate area of circle
void main()
{
float radius;
clrscr();
cout<<"Enter radius of circle"<<endl;
cin>>radius;
cout<<"Area of circle is "<< 2 * PI * radius; //calulate the area of //circle
getch();
}


Output :-