Find the area of a circle where the radius is provided by the user.
//Find the area of a circle where the radius is provided by the user.
#include <iostream>
using namespace std;
#define PI 3.141
int main()
{
float radius, area;
cout << "Enter radius of circle\n";
cin >> radius;
// Area of Circle = PI x Radius X Radius
area = PI*radius*radius;
cout << "Area of circle : " << area;
return 0;
}
Comments
Leave a comment