Calculate circumference of circle - C Program

C program to calculate circumference of circle.

Solution:

Formula: Circumference of Circle = 2 * pi * r

Here, pi = 3.14

#include<stdio.h>
int main()
{
     int r;
     float cir;
     printf("Enter Radius : ");
     scanf("%d",&r);
     cir=2*3.14*r;
     printf("\nCircumference of Circle = %.2f",cir);
     return 0;
}


Output:

circumference of circle