JAVAAAAAAAAAA
This commit is contained in:
parent
6d2c613a9c
commit
f0e71f54e1
BIN
DEV2.1/random/point.class
Normal file
BIN
DEV2.1/random/point.class
Normal file
Binary file not shown.
27
DEV2.1/random/point.java
Normal file
27
DEV2.1/random/point.java
Normal file
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
BIN
DEV2.1/random/test.class
Normal file
BIN
DEV2.1/random/test.class
Normal file
Binary file not shown.
10
DEV2.1/random/test.java
Normal file
10
DEV2.1/random/test.java
Normal file
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
BIN
DEV2.1/random/test2.class
Normal file
BIN
DEV2.1/random/test2.class
Normal file
Binary file not shown.
10
DEV2.1/random/test2.java
Normal file
10
DEV2.1/random/test2.java
Normal file
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user