Calculate Area and Circumference of Circle in C++

C++ Program to find the Area and Circumference of the Circle from the given radius.

Source code :

#include <iostream>

#define PI 3.14159265358979323846


using namespace std;

int main(){

int radius = 10;
float area,circumference;


area = PI * radius * radius;
circumference = 2 * PI * radius;

cout<<"Given Radius : "<< radius << "
Area : " << area <<"
Circumference : " << circumference;

return 0;

}

Output :

Given Radius : 10
Area : 314.159
Circumference : 62.8319

Output :


                

Comments :