星空网 > 软件开发 > Java

第二章作业.

2.6

import java.until.Scanner;
public class ComputeArea{
  public static void main(String[] args){
  Scanner input =new Scanner(System.in);
  System.out.print("Enter a number between 0 and 1000: ");
  double digits =input.nextDouble();
  double sun =digits+digits+digits+digits;
  System.out.println("the sun of the digits " + digits +"is" +sun);

  }
}

2.15

import java.until.Scanner;
public class ComputeDistance{
  public static void main(String[] args){
  Scanner input =new Scanner(System.in);
  System.out.print("Enter x1 and y1 : ");
  System.out.print("Enter x2 and y2: ");
  double point =input.nextDouble();
  double number =(x2-x1)(x2-x1)+(y2-y1)(y2-y1);
  double distance =Math.pow(number,0.5);
  System.out.println("the distance between the two points " + points+"is" +distance);

  }
}

 

原标题:第二章作业.

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

tiktok怎么做电商运营?在国内如何运营tiktok:https://www.goluckyvip.com/news/10392.html
亚马逊卖家看过来!权威解读日本消费税合规清关+退税详解:https://www.goluckyvip.com/news/10393.html
资讯 | TikTok计划向东南亚投资数十亿美元 :https://www.goluckyvip.com/news/10394.html
跨境物流管理平台主要功能有哪些? :https://www.goluckyvip.com/news/10395.html
国际物流系统是由哪些部分组成? :https://www.goluckyvip.com/news/10396.html
追赶Temu, TikTok或上线自营平台 ! :https://www.goluckyvip.com/news/10397.html
这样的邮件,买手是不会回的……:https://www.xlkjsw.com/news/92268.html
重磅利好!欧洲大国暂停100多种商品进口税:https://www.kjdsnews.com/a/1842170.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流