This is c program that asks user to find out the Area of a circle. User need to declare the math function header file for calculation along with required variables like radius or area. User asks to enter radius of a circle for find out the area. User then uses the method to find out the area of a circle. Then too display result on the screen as result.
Problem Statement:
This is C program that ask user to find out the area of a circle.
- Declare the variables.
- Using method for area of circle.
- Display result on the screen.
Formula to area of circle.
“pi*r*r” (pi=3.14)
Here is C source code to find out the area of circle. The output of this program shown below.
#include <stdio.h>
main( )
{
float radius, area;
printf ("Radius = ? “ ) ;
scanf ( "%f" , &radius) ;
area = 3.14159 * radius * radius;
printf ("Area = %f",area) ;
}