Jump to content

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

Line 2,413:
rows := Standard->ReadLine()->ToInt();
cols := Standard->ReadLine()->ToInt();
 
array := Float->New[rows, cols];
array[0,0] := 42.0;
if(rows > 0 & cols > 0) {
Standard->Print("The number at place: ")->PrintLine(array[0,0]);
array := Float->New[rows, cols];
array[0,0] := 42.0;
Standard->Print("The number at place: ")->PrintLine(array[0,0]);
}
}
}
760

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.