圆的面积等于半径×圆周率,周长=2×圆周率×半径
#define PI 3.1415926
#include "stdio.h"
int main()//圆的面积和周长
{
float r,l,s;
printf("请输入半径:");
scanf("%f",&r);
l=2*PI*r;
s=PI*r*r;
printf("周长l=%0.2f\n面积s=%0.2f\n",l,s);
return 0;
}
标签:求圆,周长,面积,C语言,printf,半径,PI From: https://www.cnblogs.com/hyborn/p/17228604.html