C program to find area of circle

devquora
devquora

Posted On: Jan 26, 2023

C program to find area of circle

 

Overview:

First of all, in this article, I will teach you about circles and the area of circles. Then, I will show the demonstration area of the circle formula. Moreover, I will write a c program to print the area of the circle. After all, I will show its output.

Table of contents:

  1. What is Circle?
  2. What is the radius of a circle?
  3. What is the formula for the area of circle?
  4. Demonstration of area of a circle
  5. Logic to calculate the area of the circle
  6. C program to find area of circle
  7. Conclusion

What is Circle?

A circle is an important geometrical shape whose distance from the center to the edge is always the same. A circle is named by its center. In other words, A circle can be defined as a locus (a set of points in a particular position) of points that maintain equidistant from another point called the center. In other words, a circle is a Every circle has a center. A circle has the following components:

DemoCircle

What is the radius of a circle?

The radius of a circle is the distance from the center of a circle to any point on the circle's Circumference.

What is the formula for the area of the circle?

The area of a circle can be calculated by using this formula: A = Πr

In this formula,

The area and radius of the circle is denoted as A and r respectively.

π is a constant whose value is 3.1415 or 22/7.

Demonstration of area of a circle

Demo of area of the circle

Logic to calculate area of the circle

  • Step 1: First get the radius of the circle, by using the variable r
  • Step 2: Then store the value of the area of circle into another variable area.
  • Step 3: After all, display variable area.

C program to find area of circle

#include <stdio.h>
 
int main() {
   float radius, area;
 
   printf("\nEnter the radius of the Circle : ");
   scanf("%d", &radius);
 
   area = 3.14 * radius * radius;
   printf("\n The Area of The Circle : %f", area);
 
   return (0);
}

Demo for Area of the circle

Conclusion:

A circle can be defined as a locus (a set of points in a particular position) of points that maintain equidistant from another point called the center. In this Program first of all User Enter the radius of the circle then it shows the area of the circle according to the given radius by using formula A = Π r2. Area is always squarely proportional to the radius.

    Please Login or Register to leave a response.

    Related Articles

    C Program Examples

    C Program to convert Decimal to Binary Number

    A Decimal Number is constructed with any digit from 0 to 9. For instance, 24 is a Decimal Number constructed from the digits 2 and 4. A Binary Number is constructed with digits 0 and 1. For instance, ..

    C Program Examples

    C program to reverse a string

    This program reversed the entered string that means opposite of the previous string sequence...

    C Program Examples

    C program to reverse an Integer number

    Are you want a demonstration of The C Program that reverses an Integer number? This Program reversing the sequence of digits in an Integer. After the successful compilation of the program, a message..