To enter Radius of Circle and to calculate its Area.

 Program:


#include<stdio.h>
#include<conio.h>
#define pi 3.14
void main()
{
    float r, area;
    clrscr();
    printf("Enter Radius of Circle : ");
    scanf("%f", &r);
    area=pi*r*r;
    printf("Area of Circle is : %.2f square units", area);
    getch();
}

Output:


Enter Radius of Circle : 20
Area of Circle is : 1256.64 square units


No comments:

Post a Comment