C Program to find area and circumference of circle

C Program to find area and circumference of circle​

Write Simple C Program to Find Area and Circumference of a circle C language. the user to input the radius of a circle and outputs the area and circumference of the circle.

#include<stdio.h>
#include<conio.h>
void main() 
{
    int r;
float pi=3.14,area,cir;
    clrscr();
    printf("\nEnter the Radius of a Circle:");
    scanf("%d",&r);
    area=pi*r*r;
    printf("\nArea of a Circle is: %f\n",area);
    cir=2*pi*r;
    printf("\nCircumference is: %f",cir);
    getch();
}
 

Output

  1. You can see here. First of all the Header File Structure of the C Program has been created.
  2. After that Main() Function is written.
  3. int num1,num2 These variables have been created. In which the data is stored
  4. add is also a variable created. Whose value is num1+num2.
  5. printf(“addition = %d”,add); Here the value of add has been printed.
TOP