Write a C program to find the area and circumference of a circle by taking radius as a input from the user.
Hi aspirant,
Following below is the C program displaying the same:
#include<stdio.h>
int main()
{
float r,c,a,pi,;
pi=3.14;
scanf("%f",&r);
a=pi*r*r;
printf("area= %f\n",a);
c= 2*pi*r;
printf("circumference= %f",c);
return 0;
}
Hope it helps!!