nyoj242
来源:互联网 发布:新网域名客服 编辑:程序博客网 时间:2024/06/11 22:56
#include<stdio.h>
#define PI 3.1415926
int main()
{
double r;
while(scanf("%lf",&r) != EOF)
{
double v = 4*PI*r*r*r/3;
printf("%.0lf\n",v);
}
return 0;
#define PI 3.1415926
int main()
{
double r;
while(scanf("%lf",&r) != EOF)
{
double v = 4*PI*r*r*r/3;
printf("%.0lf\n",v);
}
return 0;
}
心得:要注意四舍五入的方法
0 0
- nyoj242
- nyoj242
- NYOJ242 - 计算球体积
- nyoj242计算球体积
- uvaoj216Geting in line---思路+易错+代码
- 239,eclipse 中xml之智能提示
- 欢迎使用CSDN-markdown编辑器
- 循环冗余检验CRC(Cyclic Redundancy Check)
- 判断字符串是否为格式正确的数字的方法
- nyoj242
- Blog Start
- 推荐5个非常酷的医疗健康APP
- ZOJ - 2110 Tempter of the Bone
- 草泥马的FreeBSD
- JavaScript_Math
- hdoj 5615 Jam's math problem 【求根式】
- 如何查看Spark集群运行结束的日志
- SGI STL源码下载地址