AC代码:

#include<stdio.h> 
#include<math.h> 
int main()
{
	double P=acos(-1);
	double x0,y0,z0,x1,y1,z1;
	while(scanf("%lf %lf %lf %lf %lf %lf",&x0,&y0,&z0,&x1,&y1,&z1)!=EOF)
	{
		double S,V,R;
		R=sqrt(pow(x0-x1,2)+pow(y0-y1,2)+pow(z0-z1,2));
		S=4.0*P*pow(R,2);
		V=4.0/3.0*P*pow(R,3);
		printf("%.3lf %.3lf\n",R,V);
	}
	return 0;
} 

  

相关文章:

  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-16
  • 2022-01-11
  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
  • 2022-02-13
相关资源
相似解决方案