Header Ads

C program to calculate area of circle

area of circle = Î *Π*radius of circle

#include<stdio.h>
main()
{
int r;
float pi=3.14,area;
printf("Enter the radius of circle : ");
scanf("%d",&r);
area = pi*r*r;
printf("Area of the circle = %f ",area);
return 0;
}

OUTPUT :-

Enter the radius of circle : 5
Area of the circle = 78.0000000
------------------------------

No comments