Write a C program to find area and perimeter of Circle.


 

 #include <stdio.h>


 int main() {

   int radius;

   float area, perimeter;    //variable declaration

   

   printf("Enter Radius of circle: ");

   scanf("%d",&radius);      //taking radius as input


   perimeter = 2*3.14*radius;    //formula to find perimeter

   printf("Perimeter of the Circle = %f inches\n", perimeter);

  area = 3.14*radius*radius;    //formula to find area

  printf("Area of the Circle = %f square inches\n", area);


 return(0);

}

Popular posts from this blog

In this problem, you will practice your knowledge on interfaces - Hacker Rank Solution.