Area (A) = π * radius^2
Input: r = 5 Output: 78.5 sq units Explanation: Area = 3.14 * 5 * 5 = 3.14 * 25 = 78.5 square units
Step-by-step Algorithm:
C program to Print Aread of a Circle.
//C implementation to find Area of a circle #include <stdio.h> #define PI 3.14 int main() { float radius, area; // radius of the circle printf("Enter the radius of the circle: "); scanf("%f", &radius); // area of the circle area = PI * radius * radius; printf("Area of the circle: %.2f square units\n", area); return 0; }
Enter the radius of the circle: 5
Area of the circle: 78.50 square units




Trends is an amazing magazine Blogger theme that is easy to customize and change to fit your needs.