zoukankan      html  css  js  c++  java
  • 第二周。

    import java.util.Scanner;
    public class Ex {
        public static void main(String[] args) {
            Scanner Lf=new Scanner(System.in);
            double x1,x2,y1,y2;
            System.out.println("请键入X1的值:");
            x1 = Double.valueOf(Lf.nextLine());
            System.out.println("请键入X2的值:");
            x2 = Double.valueOf(Lf.nextLine());
            System.out.println("请键入Y1的值:");
            y1 = Double.valueOf(Lf.nextLine());
            System.out.println("请键入Y2的值:");
            y2 = Double.valueOf(Lf.nextLine());
            System.out.println("两个点之间的距离是:"+ Math.pow((Math.pow((x2 - x1),2)+Math.pow((y2 - y1),2)),0.5));

        }
    }

  • 相关阅读:
    Redis 连接命令
    Redis 脚本
    Redis 事务
    Redis 发布订阅
    Redis HyperLogLog
    Redis 有序集合(sorted set)
    Redis 集合(Set)
    Redis 列表(List)
    Redis 哈希(Hash)
    特定消费者的限制流量
  • 原文地址:https://www.cnblogs.com/kuangzhiwei/p/7542142.html
Copyright © 2011-2022 走看看