RosettaCodeData/Task/Create-a-two-dimensional-array-at-runtime/Clojure/create-a-two-dimensional-array-at-runtime.clj

6 lines
201 B
Clojure
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
(let [rows (Integer/parseInt (read-line))
cols (Integer/parseInt (read-line))
a (to-array-2d (repeat rows (repeat cols nil)))]
(aset a 0 0 12)
(println "Element at 0,0:" (aget a 0 0)))