You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
234 B
6 lines
234 B
1 year ago
|
|
||
|
def hello(x:Int) =
|
||
|
new Array[Int](x + getchar());
|
||
|
val arr = hello(5);
|
||
|
arr(0) = toInt('H'); arr(1) = toInt('e'); arr(2) = toInt('l'); arr(3) = toInt('l'); arr(4) = toInt('o');
|
||
|
putchar(arr(3));putchar(arr(4));putchar(arr(2));arr(0)
|