C program to calculate Area and Circumference of Circle. In this program we will take radius of circle from user as an input calculate area and circumference of circle using following formula in c language.

  • Area = 3.14 * radius * radius
  • Circumference = 2 * 3.14 * radius

Area and Circumference of Circle

In the following program we calculate Area and Circumference of Circle. In the following program we will take input radius and store it in radius variable and then put the formul to calculate area and circumference.



#include<stdio.h>
void main()
{
  float radius, area, cf;
    printf("Enter Radius of Circle\n");
    scanf("%f",&radius);

    //value of pi is 3.14
    area=3.14*radius*radius;
    printf("The area of Circle is %f",area);

    cf=2*3.14*radius;
    printf("\nThe Circumference of Circle is %f",cf);
}

		


		
		area of circle
		Figure 1
		
		
		
		circumference of circle
		Figure 2