Program: 4

Write a C program to find the area of circle.

#include
#include
void main()
{
    int rad;
    float pi=3.14, area;
    printf("Enter the value of radius: ");
    scanf("%d", &rad);
    area=pi*rad*rad;
    printf("The area of the circle is: %f", area);
    getch();
}
Output

Enter the value of radius: 4

The area of the circle is: 50.240002

Leave a Comment

This website uses cookies.