C Program to Calculate Area and Circumference of Circle


 Circumference of a Circle = 2 * Ï€ * r.
Here PI (Ï€) is a Greek Letter and r is a Radius (1/2 Of Diameter ). PI (Ï€) = 3.141592653589793 Approx. It Is A Constant Value for more about Circumference 

 

C Program to Find Area and Circumference of Circle

DOWNLOAD CODE


#include <stdio.h>

 

#define PI 3.14159

 

int main(){

    float radius ,aera, circumfrence;

   

    //input radius form the user

    printf("Enter the redius of the circle : ");

    scanf("%f", &radius);

   

    //calculate area of the circle

    aera = PI * radius * radius ;

   

    //calculate circumfrence of the circle

    circumfrence = 2 * PI *radius;

  

    //display result

    printf("Area of the cycle : %2.f\n",aera);

    printf("circumfrence of the circle: %2.f\n", circumfrence);

 

    return 0;

}


PROGRAM 





OUTPUT