#include
{
float r;
printf("请输入圆的半径: ");
scanf("%f",&r);
printf("圆的周长是: %f\n",(2*3.14*r));//求出圆周长
printf("圆的面积是: %f\n",(3.14*r*r));//求出圆面积
}
#include
void main()
{
float h,r,l,s,PI=3.141526;;
printf("请输入圆半径r,圆柱高h:");
scanf("%f,%f",&r,&h);
l=PI*(r*2);
s=(r*r)*PI;
printf("圆的周长:%6.2f\n",l);
printf("圆的面积:%6.2f\n",s);}
#include
#include
#define PI 3.14
void main()
{
int r;
float s,c;
printf("please input r\n");
scanf("%d",&r);
s=r*r*PI;
c=r*2*PI;
printf("zhouchang = %f,mianji =%f",c,s);
}
#define PI3.1416
void main()
{
float r,c,s;
scanf("%d",&r);
c=2*PI*r
s=PI*r*r
printf("c=%6.2f,s=%6.2f\n",c,s);
}