NBA - Boston Celtics

Tuesday, 17 January 2012

To find the circumference and the area of a circle.......(in c)


 #include
 #include
 void main()
 {
 int r;
 const int pi=3.14;
 float cir,area;
 clrscr();
 printf("enter the radius of circle  :\n");
 scanf("%d",&r);
 cir=2*pi*r;
 area=pi*r*r;
 printf("\nthe circumfrence of the circle is = %.2f",cir);
 printf("\nthe area of the circle is = %.2f",area);
 getche();
 }

No comments:

Post a Comment