C Program To Find Area And Perimeter Of Circle

C Program To Find Area And Perimeter Of Circle

#include<stdio.h>

int main()
{

 int radius;
float PI = 3.14, area, perimeter;

    printf("\nEnter radiusius of circle: ");
    scanf("%d", &radius);   //Input Radius From User

   area = PI * radius * radius;   //Area of circle
   printf("Area of circle : %f \n", area);   //Print Area On Output Screen

   perimeter = 2 * PI * radius; //perimeter of circle
   printf("Perimeter of circle is : %f \n", perimeter);  //Print perimeter On Output Screen

   return (0);
}

Related Posts