Home C C++ Java Python Perl PHP SQL JavaScript Linux Selenium QT Online Test

Home » Solved Programs » C program to find area of a Circle

C program to find area of a Circle

The formula to calculate area of Circle is pi * radius * radius, where the value is pi is 3.14. In this program user is asked to enter radius and the output is the area of circle.


#include<stdio.h>

#define PI 3.14 int main () { float radius, area; printf("Enter the radius of circle := "); scanf("%f", &radius); area=PI*radius*radius; printf("Area of the circle with radius %f is = %f", radius, area); return 0; }

Finding area of Circle when radius is 2

Find area of circle in C programming