-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathFoo1.java
51 lines (44 loc) · 1.58 KB
/
Foo1.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
class Foo1 {
public static void main(String args[]){
int x = (int)(Math.random()*42+1);
int y = 6345;
int c = 0;
int d = 23456;
int f = 0;
System.out.println("HelloWorld");
System.out.println("--------------------" );
System.out.println("initial value ");
System.out.println("random number x : " + x);
System.out.println("x = " + x );
System.out.println("y = " + y );
System.out.println("c = " + c );
System.out.println("d = " + d );
System.out.println("f = " + f );
System.out.println("--------------------" );
c = x+y;
d +=c ;
System.out.println("c = x + y = " +x+ " + " + y + " = " + c);
System.out.println("d = d + c = " + d );
x = c/2;
System.out.println("x = c/2 = " + x );
c = x*y;
d +=c ;
System.out.println("c = x * y = " +x+ " * " + y + " = " + c);
System.out.println("d = d + c = " + d );
x = c/2;
System.out.println("x = c/2 = " + x );
c = x-y;
d +=c ;
System.out.println("c = x - y = " +x+ " - " + y + " = " + c);
System.out.println("d = d + c = " + d );
x = c/2;
System.out.println("x = c/2 = " + x );
c = x/y;
d +=c ;
System.out.println("c = x / y = " +x+ " / " + y + " = " + c);
System.out.println("d = d + c = " + d );
f = d + x + y + c ;
System.out.println("f = " + (d) + " + " + (x) + " + " + (y) + " + " + (c) + " = " + f );
System.out.println("Foo Test By WJY");
}
}