早教吧作业答案频道 -->数学-->
Java中判断任意两个圆的位置关系publicvoidCompare(Circlec1,Circlec2){doubleS,R1,R2;\x05S=getDistance(Pointp1,Pointp2)\x05R1=Math.abs(GetR(c1)+GetR(c2));\x05R2=Math.abs(GetR(c1)-GetR(c2));\x05if(S==0&&GetR(c1)==GetR(c2))\x05\x05Syst
题目详情
Java中判断任意两个圆的位置关系
public void Compare(Circle c1,Circle c2) {
double S,R1,R2;
\x05S=getDistance(Point p1,Point p2)
\x05R1=Math.abs(GetR(c1)+GetR(c2));
\x05R2=Math.abs(GetR(c1)-GetR(c2));
\x05if(S==0&&GetR(c1)==GetR(c2))
\x05\x05System.out.println("两个圆重合!");
else if (S>R1)
\x05\x05System.out.println("两个圆相离!");
\x05else if (S==R1)
\x05\x05System.out.println("两个圆外切!");
\x05else if (S==R2)
\x05\x05System.out.println("两个圆内切!");
\x05else if (S>R2&&S
public void Compare(Circle c1,Circle c2) {
double S,R1,R2;
\x05S=getDistance(Point p1,Point p2)
\x05R1=Math.abs(GetR(c1)+GetR(c2));
\x05R2=Math.abs(GetR(c1)-GetR(c2));
\x05if(S==0&&GetR(c1)==GetR(c2))
\x05\x05System.out.println("两个圆重合!");
else if (S>R1)
\x05\x05System.out.println("两个圆相离!");
\x05else if (S==R1)
\x05\x05System.out.println("两个圆外切!");
\x05else if (S==R2)
\x05\x05System.out.println("两个圆内切!");
\x05else if (S>R2&&S
▼优质解答
答案和解析
S=getDistance(Point p1,Point p2)
这句话后面少了个分号~
这句话后面少了个分号~
看了 Java中判断任意两个圆的位...的网友还看了以下:
Errorusing*Toomanyinputarguments.Errorusing*Tooma 2020-04-25 …
CO2分子是直线型,其C原子的成键轨道是A2个sp杂化轨道B2个p轨道C2个sp杂化轨道及2个p轨 2020-04-26 …
Java中判断任意两个圆的位置关系publicvoidCompare(Circlec1,Circl 2020-06-09 …
设随机变量X~t(n),Y~F(1,n),给定a(0<a<0.5),常数c满足P{X>c}=a,则 2020-07-09 …
已知三角形的三边长分别为a、b、c,求其面积问题,中外数学家曾经进行过深入研究,古希腊的几何学家海 2020-07-20 …
如图,设P是抛物线C1:x2=y上的动点.过点P做圆C2:x2+(y+3)2=1的两条切线,交直线 2020-07-29 …
我们知道,如果一个三角形的三边分别为a、b、c,设P=a+b+c2,则三角形的面积可以表示为S=p 2020-08-02 …
阅读与解答:古希腊的几何学家海伦,在他的著作《度量》一书中,给出了下面一个公式:如果一个三角形的三边 2020-12-20 …
已知三角形三边之长能求出三角形的面积吗?海伦公式告诉你计算的方法是:S=p(p-a)(p-b)(p- 2021-02-07 …
(2012•利辛县二模)已知三角形的三边长,求三角形面积,有公式:S=p(p−a)(p−b)(p−c 2021-02-07 …