Monday, October 14, 2019

Area-of-Circle


C Program to find Area of a Circle

In geometry, the area enclosed by a circle of radius r is πr2. Here the Greek letter π represents a constant, approximately equal to 3.14159, which is equal to the ratio of the circumference of any circle to its diameter.






#include<stdio.h>
#include<conio.h>

void main()
{
    float radius,area,pi=3.14;
    clrscr();
 
    printf("Enter the Radius of a Circle : ");
    scanf("%f",&radius);
 
    area = pi*radius*radius;
 
    printf("Area of Circle is: %f",area);
    getch();
}
 OUTPUT:
Enter the Radius of a Circle : 2
Area of Circle is: 12.560000

No comments:

Post a Comment