Create a two-dimensional array at runtime: Difference between revisions

Add Seed7 example
No edit summary
(Add Seed7 example)
Line 1,229:
}</lang>
 
=={{header|Seed7}}==
<lang seed7>$ include "seed7_05.s7i";
 
const proc: main is func
local
var integer: numRows is 0;
var integer: numCols is 0;
var array array integer: anArray is 0 times 0 times 0;
begin
write("Give me the numer of rows: ");
readln(numRows);
write("Give me the numer of columns: ");
readln(numCols);
anArray := numRows times numCols times 0;
anArray[1][1] := 3;
writeln("The number at place [1, 1] is " <& anArray[1][1]);
end func;</lang>
 
Output:
<pre>
Give me the numer of rows: 5
Give me the numer of columns: 7
The number at place [1, 1] is 3
</pre>
 
=={{header|Smalltalk}}==