Thursday, 18 August 2016
Area of Circle
Area of Circle
#include < stdio.h >
#include < math.h >
#define PI 3.142
void main()
{
float radius, area;
printf("Enter the radius of a circle \n");
scanf("%f", &radius);
area = PI * pow(radius, 2);
printf("Area of a circle = %5.2f\n", area);
}
Subscribe to:
Post Comments
(Atom)
0 comments:
Post a Comment