C Program to Find Area and Circumference of a Circle

This video tutorial teaches you how to write a program in c programming language which will calculate the area and the circumference of the circle.
Here in this tutorial the user will enter the value of the radius of the circle and depending on that input we will calculate the area of the circle using the formula Area = PI * radius * radius and the circumference of the circle using the formula Circumference = 2 * PI * radius, where PI = 3.14.



Source code for this video tutorial

#include <stdio.h>
#include <stdlib.h>

int main()
{
   float area, cf, radius, pi = 3.14;
   printf("Enter the radius of the circle\n");
   scanf("%f",&radius);

   area = pi * radius * radius;

   cf = 2 * pi * radius;

   printf("Area of the circle is %f\n",area);
   printf("Circumference of the circle is %f\n",cf);

    return 0;
}