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

In this C program, we will find the circumference and area of circle when radius is given. To find the circumference and area of circle, we will first take radius of circle as input from user using scanf function and then calculate area and perimeter of circle using following formulae.

Required Knowledge


  • Circumference of Circle = 2 x PI x Radius
  • Area of Circle = PI X Radius X Radius

C program to find the circumference and area of circle

#include <stdio.h>  
#define PI 3.141

int main() {  
    float radius;  
    float circumference, area;  
       
    printf("Enter Radius of Circle\n");  
    scanf("%f", &radius);  
   
    circumference = 2*PI*radius; 
 
    area = PI*(radius*radius);  
    
    printf("Circumference of Circle : %.4f\n",
        circumference);  
    printf("Area of Circle = %.4f\n", area);  
  
    return 0;  
}

Output
Enter Radius of Circle
4.2
Circumference of Circle : 26.3844
Area of Circle = 55.4072

Related Topics
C program to calculate area of a rectangle
C program to calculate area of a parallelogram
C program to calculate area of a rhombus
C program to calculate area of a trapezium
C program to calculate area of a right angled triangle
C program to calculate area of any triangle
C program to calculate volume and total surface area of cylinder
C program to calculate volume and total surface area of sphere
C program to calculate area of an equilateral triangle
List of all C programs