forked from PromathBul/Wave_algorithm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon_methods.java
More file actions
23 lines (23 loc) · 808 Bytes
/
common_methods.java
File metadata and controls
23 lines (23 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
public class common_methods {
static void show2dArray(int[][] array) {
for (int i = 0; i < array[0].length * 8; i++)
System.out.print("_");
System.out.println();
for (int i = 0; i < array.length; i++) {
for (int j = 0; j < array[i].length; j++) {
if (j != array[i].length - 1)
System.out.printf("| %d\t", array[i][j]);
else
System.out.printf("| %d\t|", array[i][j]);
}
System.out.println();
for (int k = 0; k < array[0].length * 8 + 1; k++) {
if (k % 8 == 0)
System.out.print("|");
else
System.out.print("_");
}
System.out.println();
}
}
}