EOF&.0
来源:互联网 发布:js post传参方式 编辑:程序博客网 时间:2024/06/07 02:21
while里面不能少EOF不然会超时,double运算分母要加.0。
#include <stdio.h>
#include <stdlib.h>
#include<math.h>
int main()
{
double x0,y0,z0,x1,y1,z1,r,v,PI;
while(scanf("%lf%lf%lf%lf%lf%lf",&x0,&y0,&z0,&x1,&y1,&z1)!=EOF){
PI=acos(-1);
r=sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0)+(z1-z0)*(z1-z0));
v=4.0/3*PI*r*r*r;
printf("%.3lf %.3lf\n",r,v);
}
return 0;
}
0 0
- EOF&.0
- EOF和'\0'
- a+bproblem(0+EOF)
- NULL NUL \0 EOF
- eof ()
- EOF
- eof
- EOF
- EOF
- EOF
- EOF
- EOF
- EOF
- eof
- EOF
- EOF
- EOF
- EOF
- 颜色分类
- TinyReplaySystem回放系统设计和开发
- IBM openblockchain学习(五)--consensus源码分析
- Python学习笔记07
- 那罗延数
- EOF&.0
- 学习汇编的一些技巧和概念性常识
- Java基础:子类继承父类调用顺序
- Android系列之网络(三)----使用HttpClient发送HTTP请求(分别通过GET和POST方法发送数据)
- HDU 5673 Robot(卡特兰数)
- CodeForces 598E Chocolate Bar(DP|记忆化搜索)
- 罗马数字表示方式
- 剑指offer之面试题16:反转链表
- HDU4002