-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSciperList.scala
34 lines (30 loc) · 902 Bytes
/
SciperList.scala
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
object SciperList {
def printArray(arr: array[15]): Unit = {
val i: [0 .. 14] = 0;
printFrom(arr, i)
}
def printFrom(arr: array[15], i: [0 .. 14]): Unit = {
Std.printInt(arr[i]);
if(i < arr.length - 1) {
printFrom(arr, i + 1)
} else {
()
}
}
val scipers: array[15] = [123456,
654321,
234567,
765432,
345678,
876543,
456789,
987654,
567890,
678901,
109876,
789012,
210987,
890123,
321098];
printArray(scipers)
}