OEF04.java
1 |
|
2 |
|
3 |
Licensed under the Apache License, Version 2.0 (the "License"); |
4 |
you may not use this file except in compliance with the License. |
5 |
You may obtain a copy of the License at |
6 |
|
7 |
https://www.apache.org/licenses/LICENSE-2.0 |
8 |
|
9 |
Unless required by applicable law or agreed to in writing, software |
10 |
distributed under the License is distributed on an "AS IS" BASIS, |
11 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 |
See the License for the specific language governing permissions and |
13 |
limitations under the License.*/ |
14 |
import java.util.*; |
15 |
|
16 |
class OEF04 |
17 |
{ |
18 |
public static void main(String[] args) |
19 |
{ |
20 |
Random random = new Random(); |
21 |
for(int i=0; i<25; i++) |
22 |
{ |
23 |
int a = random.nextInt(); |
24 |
int b = random.nextInt(); |
25 |
System.out.print(a + " is "); |
26 |
if(a>b) |
27 |
System.out.print("groter dan"); |
28 |
else if(a==b) |
29 |
System.out.print("gelijk aan"); |
30 |
else |
31 |
System.out.print("kleiner dan"); |
32 |
System.out.println(" " + b); |
33 |
} |
34 |
} |
35 |
} |
36 |