Area of Circle Example C Program
On this page (6sections)
About this program
This is an example program in c calculation programs. Read the concept first: Data Types in C Programming, then study the code and output below.
Definition
The area of a circle is π (Pi) times the Radius squared, which is written A=πr2.
Formula
The area of a circle is written
A=πr2
here,
r = Radius
π = ~3.14
Area Of Circle Example Program
/*##Area Of Circle*/
/*##Calculation Programs, Datatype Programs, Basic Programs*/
#include<stdio.h>
int main(){
float radius, area;
printf("\nEnter the radius of Circle : ");
scanf("%f", &radius);
area = 3.14 * radius * radius;
printf("\nArea of Circle : %f", area);
return (0);
}
Sample Output
Output is:
Enter the radius of Circle: 2.0
Area of Circle:12.57
Related Pages
Learn the concept first, then study the code:
- C Programs — Browse all C Programs.
- Data Types in C Programming — Concept — int, float, double and format specifiers.
- Area Of Square Example C Program — More in c calculation programs.
- Area Of Rectangle Example C Program — More in c calculation programs.