RosettaCodeData/Task/Create-a-two-dimensional-array-at-runtime/Elena/create-a-two-dimensional-array-at-runtime-1.elena

17 lines
304 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
import extensions;
2026-02-01 16:33:20 -08:00
public Program()
2023-07-01 11:58:00 -04:00
{
var n := new Integer();
var m := new Integer();
2025-08-11 18:05:26 -07:00
Console.write("Enter two space delimited integers:");
Console.loadLine(n,m);
2023-07-01 11:58:00 -04:00
var myArray := class Matrix<int>.allocate(n,m);
myArray.setAt(0,0,2);
2025-08-11 18:05:26 -07:00
Console.printLine(myArray.at(0, 0))
2023-07-01 11:58:00 -04:00
}