Write a program to calculate area of a circle.
// program to calculate area of a circle.
#include<stdio.h>
int main()
{
float radius;
printf("enter the radius of a circle");
scanf("%f", &radius);
printf("area of circle=%f", 3.14*radius*radius);
return 0;
}
output will be
enter the radius of a circle5
area of circle=78.500000
Comments
Post a Comment
Please do not enter any spam link in the comment box.