In this program, the user is asked to enter radius of circle and the area of circle is calculated and the area is display displayed on console.
#include<iostream>
using namespace std;
int main()
{
float radius, area;
cout<<"Enter radius of circle: ";
cin>>radius;
area = 3.14 * radius * radius;
cout<<"Area of circle = "<<area;
return 0;
}
Enter radius of circle: 5.7
Area of circle = 102.0189