Program Description:

In this program we are going to find out the diameter, circumference and area of a circle.
 We will use the following formulas:
  1. Diameter= 2*radius
  2. Circumference= 2*3.141*radius
  3. Area=3.141*radius*radius  
We will ask the user to enter the radius of the circle. Once the user enters the value of radius, we will apply following formulas and do the necessary calculations. After that we print the necessary results.
There is one more feature in the program i.e after the program ends, we will ask the user whether he wants to check another data. if he enters 1, then we will run the program again else we will terminate the program by printing THANK YOU

Source code:

// C program to find out the area of a circle
#include<stdio.h>
int main()
{
float radius,diameter,area,circumference;
int i=1;
while(i=1)
{
printf("\nEnter the radius of the circle in centimeters:");
scanf("%f",&radius);
diameter=2.0*radius;
area=3.141*radius*radius;
circumference=2*3.141*radius;
printf("The diameter of the circle is %f\n",diameter);
printf("The circumference of the circle is %f\n",circumference);
printf("The area of the circle is %f\n\n",area);
printf("Do you want to check the properties of another circle?(0/1)");
scanf("%d",&i);
if(i!=1)
break;
}
printf("Thank You");

}


Output:


If You have any other query please contact us😃😃😊😊