diff --git a/DEV2.1/random/point.class b/DEV2.1/random/point.class new file mode 100644 index 0000000..acab74a Binary files /dev/null and b/DEV2.1/random/point.class differ diff --git a/DEV2.1/random/point.java b/DEV2.1/random/point.java new file mode 100644 index 0000000..1a8dfdb --- /dev/null +++ b/DEV2.1/random/point.java @@ -0,0 +1,27 @@ +import java.awt.Point; + +public class point +{ + public static void main(String[] args) + { + Point[] tab =new Point[10]; + int x; + int y; + for (int i = 0;i<10;i++) + { + + x = (int)(Math.random()*200)-100; + y = (int)(Math.random()*200)-100; + tab[i] = new Point(x,y); + } + for (int i = 0;i<10;i++) + { + for (int j = 0;j<10;j++) + { + System.out.println("la distance entre le point "+ + i+"et le point"+j+"est de:"+tab[i].distance(tab[j])); + } + System.out.println(); + } + } +} \ No newline at end of file diff --git a/DEV2.1/random/test.class b/DEV2.1/random/test.class new file mode 100644 index 0000000..591b27b Binary files /dev/null and b/DEV2.1/random/test.class differ diff --git a/DEV2.1/random/test.java b/DEV2.1/random/test.java new file mode 100644 index 0000000..c25ffce --- /dev/null +++ b/DEV2.1/random/test.java @@ -0,0 +1,10 @@ +public class test +{ + public static void main(String[] args) + { + for (int i=args.length-1;i>=0; i--) + { + System.out.println(args[i]); + } + } +} \ No newline at end of file diff --git a/DEV2.1/random/test2.class b/DEV2.1/random/test2.class new file mode 100644 index 0000000..b56fbe8 Binary files /dev/null and b/DEV2.1/random/test2.class differ diff --git a/DEV2.1/random/test2.java b/DEV2.1/random/test2.java new file mode 100644 index 0000000..57e25c9 --- /dev/null +++ b/DEV2.1/random/test2.java @@ -0,0 +1,10 @@ +public class test2 +{ + public static void main(String[] args) + { + for (int i=args[0].length()-1;i>=0; i--) + { + System.out.print(args[0].charAt(i)); + } + } +} \ No newline at end of file