C program to find the area of a circle, given the radius
by Nideesh C on April 11, 2011 · 1 comment
in C Programming
/* C program to find the area of a circle, given the radius*/
#include <stdio.h>
#include <conio.h>
#include <math.h>
#define PI 3.142
void main()
{
float radius, area;
clrscr();
printf(“Enter the radius of a circle\n”);
scanf (“%f”, &radius);
area = PI * pow (radius,2);
printf (“Area of a circle = %5.2f\n”, area);
}
/*—————————–
Output
RUN1
Enter the radius of a circle
3.2
Area of a circle = 32.17
RUN 2
Enter the radius of a circle
6
Area of a circle = 113.11
——————————*/
Not Satisfied ? Just search & get the result
Related posts:
- C program to find the area of a triangle, given three sides
- Sample – Program to draw circles.
- Sample – Program to change the foreground colors and draw circles on the screen.
- Sample – Program to find the roots of a quadratic equation.
- Sample – Program to find the sum of each row & column of a matrix of size n x m and if matrix is square, find the sum of the diagonals also..
Tagged as:
area of a circle,
C program to find the area of a circl,
C program to find the area of a circle,
given the adius,
given the radius
Me, freelance system administrator having the qualification of Diploma in Electronics & Tele-communication + MCSE + CCNA + CST + 5 years of experience in IT field.
If you like This post, you can follow TheOnlineTutorials on Twitter.
Contact me Via email: support@theonlinetutorials.com
Subscribe to feed via Feed or EMAIL to receive instant updates.
Legal Disclaimer:All information found on the site is without any implied warranty of fitness for any purpose or use whatsoever. Content author/site administrator is not responsible for any loss occurred due to mistakes in this tutorial. Use this tutorial website at your own risk.
{ 1 comment… read it below or add one }
C program to find the area of a circle, given the radius