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.

Find the difference between the total number of CITY entries in the table and the number of distinct CITY entries in the table.

Query the Name of any student in STUDENTS who scored higher than 75 Marks - Hacker Rank Solution.