Find area of circle in C by R4R Team

Area of circle:
area=3.14*r%r;
-Here r is the radius of the circle.

program-

#include< stdio.h>
int main() {
int r;
float area;
printf("Enter radius\n");
scanf("%d",&r);
area=3.14*r*r;
printf("Area of Circle is %f",area);
}


output-

Enter radius
3
Area of Circle is 28.260000

-In this program, we take an input in variable 'r' that is radius of circle.
-Then apply formula for area of circle and store that value in variable 'area'.
-And at last display that area.




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!