Program to find Circumference of a Circle in C++

In this tutorial, we will be discussing a program to find circumference of a circle.

For this we will be provided with the radius of the circle. Our task is to calculate and print the circumference of that circle.


 Live Demo

using namespace std;
#define PI 3.1415
double circumference(double r){
   double cir = 2*PI*r;
   return cir;
int main(){
   double r = 5;
   cout << "Circumference : " << circumference(r);
   return 0;


Circumference : 31.415