skip to main
|
skip to sidebar
C Programming
Pages
Home
Programs
Pointer
Projects
Solution
calculate area of a circle in c language | CTechnotips
C program for area of circle
#include
<stdio.h>
#define
PI 3.141
int
main()
{
float
r, a;
printf(
"Radius: "
);
scanf(
"%f"
, &r);
a = PI * r * r;
printf(
"%f\n"
, a);
return
0;
}
Mathematical formula for area of circle:
Here Pie is constant which is equal to
Pie = 22/7 or 3.14159265358979323846264338327950288419716939937510...
Radius is radius of the circle.
0 comments:
Post a Comment
Newer Post
Older Post
Home
Category
Concepts
(16)
Graphics Program
(3)
Hardware interaction through C
(9)
Pointers Tutorial
(29)
Problem
(1)
Program
(196)
Projects
(3)
Puzzles Program
(7)
Question and Answer
(15)
Solution
(4)
System Program
(9)
Virus Program
(2)
Powered by
Blogger
.
Popular Posts
0 comments:
Post a Comment