# 7+ CPP Programs to Calculate Area of a Circle

This post contains a total of 7+ CPP Program Examples with Source Code to Calculate the Area of a Circle. All these Circle Area Calculator programs are made using C++ Language.

You can use the source code of these examples with credits to the original owner.

## CPP Programs to Calculate Area of Circle

### 1. By Ali kh

Made by Ali kh. Simple Program to calculate area of a circle. Source

```10
Area= 314
Environment= 62.8```
``````#include <iostream>
using namespace std;
int main() {
const float pi=3.14;
float r,s,p;
cin >> r;
s=pi*r*r;
p=2*pi*r;
cout << "Area= " << s <<"\n" << "Environment= " << p;
return 0;
}``````

### 2. By chandraprakash

Made by chandraprakash. C++ Program to calculate area of circle using Classes and Objects. Source

```enter the radius 5
area of a circle : 78.5```
``````#include <iostream>
using namespace std;

class area
{
public :
int r;
void getdata()
cin>>r;
}
void putdata()
{cout<<"\n area of a circle : "<<3.14*r*r;
}
};
int main()
{area A;
A. getdata();
A. putdata();
return 0;
}
;``````

### 3. By Atul Singh

```Enter radius of CIRCLE 10
Area of Circle is
314```
``````#include <iostream>
using namespace std;
float area(int);
int main()
{
int r;
cin>>r;
cout<<endl<<"Area of Circle is"<<endl<<area(r);
return 0;
}
float area(int r)
{return(3.14*r*r);
}
``````

### 4. By DESHIK P

Made by DESHIK P. Program to get the Area and Circumference of a Number. Source

```6
Area of circle=113.04
Circumference of circle=37.68```
``````#include <iostream>
const float pi=3.14;
inline float area(int r)
{return(pi*r*r);}
inline float circum(int r)
{return(2*pi*r);}
using namespace std;
int main() {
int r;
cin>>r;
cout<<"Area of circle="<<area(r)<<endl;
cout<<"Circumference of circle="<<circum(r);
return 0;
}``````

### 5. By Tichi

Made by Tichi. You have to enter the radius of the circle in “double r=” to get its area. Source

```62.8318
```
``````#include <iostream>
#define PI 3.14159
#define NEWLINE '\n'
using namespace std;

int main() {
double  r=10;
double  circle;
circle =2*PI*r
;cout <<circle;
cout <<NEWLINE;'\n';
return 0;
}``````

### 6. By Varun

```15
Area of circle is 706.5```
``````#include <iostream>
using namespace std;

int main() {

double  pi = 3.14;
int r;
double area;
cin>> r;

//to find area of circle

area = pi * r*r;

cout<<"Area of circle is "<< area << endl;

return 0;
}``````

### 7. By Disha Daravatkar

```radius of circle=20
area of circle=62.8
circumfarence of circle=125.6```
``````#include <iostream>
using namespace std;

int main() {
float a,b,c;

cin>>a;

c=3.14*a;
cout<<"area of circle="<<c<<endl;

b=2*3.14*a;
cout<<"circumfarence of circle="<<b;
return 0;
}``````

### 8. By Medo Myrtle

Made by Medo Myrtle. Program to find the area and circumference of any circle. Source

```Enter the radius of the circle
20

The area of the circle with radius = 20 is :
1256
Circumferance of the circle is :
125.6```
``````#include <iostream>
using namespace std;

int main() {

#define area(r) 3.14 * r * r;
#define circum(r) 2 * 3.14 * r;