-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTask3.java
More file actions
30 lines (24 loc) · 785 Bytes
/
Task3.java
File metadata and controls
30 lines (24 loc) · 785 Bytes
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
import java.util.Random;
import static utils.LineSeparator.*;
public class Task3 {
private static Random Random = new Random();
private static int[] Arr = new int[10];
public static void main(String[] args) {
horizontallyArray();
uprightArray();
}
private static void horizontallyArray() {
System.out.println("Horizontally array: ");
for (int i = 0; i < Arr.length; i++) {
Arr[i] = Random.nextInt(10);
System.out.print(Arr[i] + " ");
}
}
private static void uprightArray() {
System.out.println(lineSeparator() + "Upright array: ");
for (int i = 0; i < Arr.length; i++) {
Arr[i] = Random.nextInt(10);
System.out.println(Arr[i]);
}
}
}