Area of circle
//we include header file math for maths tools
// M_PI maths pi
// area of circle is pi radius square
#include <stdio.h>
#include <math.h>
int main (){
float radius, area;
printf("enter the radius of circle\n");
scanf("%f" , & radius);
area = M_PI * radius *radius ;
printf("area of circle is %f " , area);
return 0 ;
}
Comments
Post a Comment