C++ Program to Find Area and Circumference of a Circle

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

OUTPUT:

Enter radius of circle
7
Area of circle : 153.909

Leave a Comment