C-圆面积

 

#include <stdio.h>
#define pi 3.1415926

int r,c,s;

int main( void
 )
{
    printf(
"请输入圆的半径:"
);
    scanf(
"%d",&
r);
    c 
= 2*pi*
r;
    s 
= pi*r*
r;
    printf(
"\n圆的周长为:[%d]"
,c);
    printf(
"\n圆的面积为:[%d]"
,s);
    
return 0
;
}


posted @ 2009-03-06 11:19  Bill Ling  阅读(178)  评论(0)    收藏  举报