Create a two-dimensional array at runtime: Difference between revisions
Create a two-dimensional array at runtime (view source)
Revision as of 15:57, 15 May 2022
, 2 years ago→{{header|Picat}}
Line 2,200:
drop /# remove array/list from the stack #/
</lang>
=={{header|Picat}}==
<lang Picat>import util.
go =>
print("Input the number of rows and columns: "),
[Rows,Cols]=split(read_line()).map(to_int),
X=new_array(Rows,Cols),
X[1,1] = Rows*Cols+1,
println(X[1,1]).</lang>
{{out}}
<pre>Input the number of rows and columns: 10 20
201</pre>
=={{header|PicoLisp}}==
|