About Me

My photo
gandhinagar, gujarat, India
hi.. friends i'am student of kv crpf gandhinagar..and i would like to spread my view and thinking on computer..this blog is for not only those who wants to get knowledge.

Wednesday 11 May 2011

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();
 }

0 comments:

Post a Comment