helloroot


私信TA

用户名:helloroot

访问量:10113

签 名:

等  级
排  名 5153
经  验 1488
参赛次数 0
文章发表 14
年  龄 0
在职情况 学生
学  校 上海交通大学
专  业

  自我简介:

解题思路:

思路很简单 pi * r * r 就这个公式



注意事项:

PI的值要定义为3.1415926, 如果定义为3.14则会报答案错误



参考代码:

#include <stdio.h>

int main()
{
	float pi = 3.1415926;
	float r;
	scanf("%f", &r);
	float result = pi * r * r;
	printf("%.2f\n",result);
	return 0;
}


 

0.0分

2 人评分

  评论区