C program to find circumference and area of a circle from given radius

Here is a simple┬áC program to find circumference and area of a circle from given radius –

main(){
float r, pi = 3.1416, c, area;

printf("\nEnter value of radius>> ");

scanf("%f", &r);

while (r > = 0.0){
c = 2*pi*r;
area = pi*r*;
printf("\nCircumference = %f", c);
printf("\nArea = %f", area);
scanf("%f", &r)
}
}

Add a Comment

Your email address will not be published. Required fields are marked *