c how to program 习题2.20

发布于2020-03-12 814 热度

//c how to program 习题2.20
#include <stdio.h>

int main(void)
{
	int r;

	printf("请输入半径:");
	scanf("%d", &r);

	printf("直径是:%d\n", r*2);
	printf("周长是:%f\n", 2*3.14159*r);
	printf("面积是:%f\n", 3.14159*r*r);
}

记录工作,记录学习,分享知识,分享经验……