C Program to read radius of circle and calculate area and circumference

radius of circle and calculate area and circumference, C Program to read radius of circle and calculate area and circumference, Write a program to read radius of a circle and calculate area and circumference.

Write a program to read radius of a circle and calculate area and circumference.
Write a c program to read radius of a circle and calculate area and circumference.

The value of PI : 3.14159

C Code


#include <stdio.h>
#include <conio.h>
#include <math.h>
void main()
{
  float r, a, c;

  printf("\nEnter radius of a circle:");
  scanf("%f",&r);

  a = M_PI*r*r;
  c = 2*M_PI*r;

  printf("\nArea of cicle = %f",a);
  printf("\nCircumference of circle = %f",c);

  getch();
}

Output

radius of circle and calculate area and circumference

You May Also Like...

Socialize with Us