C Program To Find The Area of Circle
Problem:
Write a c program to find or calculate the area of circle.Algorithm / Solution:
Formula to find the area of circle is 2*3.142*r*r.Here is the solution of C program to find or calculate the area of circle.
- Start
- Accept radius from the user.
- Calculate and store the area in 'area' variable.
- Display the area variable.
- Stop.
C Program / Source Code:
Here is the source code of C program to find or calculate the area of circle./* Aim: Write a c program to find or calculate the area of circle. */ #include<stdio.h> #define PI 3.14159 void main() { float r,area; printf("\n \n Enter Your Radius:"); scanf("%f",&r); area=PI*r*r; printf("\n \n The Area of circle is %f \n \n",area); }
/* Output of above code:-
Enter Your Radius:4
The Area of circle is 50.265442
*/