精品偷拍一区二区三区,亚洲精品永久 码,亚洲综合日韩精品欧美国产,亚洲国产日韩a在线亚洲

  • <center id="usuqs"></center>
  • 
    
  • java Math.abs和Math.sqrt

    java Math.abs和Math.sqrt
    class Line
    {
    double p1x;
    double p2x;
    double p1y;
    double p2y;
    public Line(double p1x,double p1y,double p2x,double p2y){
    this.p1x=p1x;
    this.p2x=p2x;
    this.p1y=p1y;
    this.p2y=p2y;
    }
    public String toString(){
    return "(" + p1x + "," + p1y + ")-(" + p2x + "," + p2y + ")";
    }
    public double getLength(){
    double a=Math.abs(p1x-p2x);
    double b=Math.abs(p1y-p2y);
    double c=Math.sqrt(a*a+b*b);
    \x09 return c;
    }
    \x09public static void main(String[] args)
    \x09{
    \x09Line line1 = new Line(10.5,20.1,100.0,50.0);
    \x09Line line2 = new Line(-1.0,0.0,0.0,1.0);
    \x09System.out.println(line1);
    \x09System.out.println(line1.getLength());
    \x09System.out.println(line2);
    \x09System.out.println(line2.getLength());
    \x09}
    }
    不能運(yùn)行 總是找不到符號(hào)
    怎么回事啊
    其他人氣:870 ℃時(shí)間:2020-05-21 21:15:20
    優(yōu)質(zhì)解答
    已運(yùn)行(未作修改).運(yùn)行結(jié)果:
    (10.5,20.1)-(100.0,50.0)
    94.36238657431254
    (-1.0,0.0)-(0.0,1.0)
    1.4142135623730951
    我來回答
    類似推薦
    請(qǐng)使用1024x768 IE6.0或更高版本瀏覽器瀏覽本站點(diǎn),以保證最佳閱讀效果。本頁提供作業(yè)小助手,一起搜作業(yè)以及作業(yè)好幫手最新版!
    版權(quán)所有 CopyRight © 2012-2024 作業(yè)小助手 All Rights Reserved. 手機(jī)版