算法
文章平均质量分 64
qq_40648976
这个作者很懒,什么都没留下…
展开
-
Algorithms 第一章1.2
1.2.1 编写一个Point2D实例,从命令行接受一个参数N。在单位正方形中生成N个随机点,然后计算两点之间的最近距离。 public class Test01 { public static void main(String[] args) { Random r = new Random(); int N = Integer.parseInt(args[0]); Point2D[] arr = new Point2D[N]; do原创 2021-03-13 20:53:04 · 53 阅读 · 0 评论 -
Algorithms 第一章1.1
1.1.3 编写一个程序,从命令行得到三个整数参数。如果它们都相等则打印equal,否则打印not equal。 public class Test00 { public static void main(String[] args) { int num1 = Integer.parseInt(args[0]); int num2 = Integer.parseInt(args[1]); int num3 = Integer.parseInt(arg原创 2021-03-08 20:37:16 · 126 阅读 · 0 评论