+ 1

Who can tradiction that to pascal

int a[9][9] = {{0,1,0,0,5,4,0,0,0}, {3,0,0,0,0,0,0,0,0}, {0,0,0,6,3,0,0,0,0}, {0,0,3,0,0,0,0,8,1}, {8,0,2,0,0,0,6,3,0}, {6,0,0,0,0,0,5,4,0}, {0,0,0,0,6,5,0,0,9}, {0,0,0,3,2,1,0,0,6}, {0,0,0,9,0,0,4,5,0} };

23rd Feb 2017, 5:27 PM
Mr Reymes
Mr Reymes - avatar
4 Respostas
+ 7
@Alvaro: Unfortunately. There is not much to learn except typing -.-
23rd Feb 2017, 7:10 PM
Tashi N
Tashi N - avatar
+ 6
What Alvaro said +you could use loops for the zeros. a [1,0]:=3; for i := 1 to 8 do begin a [1, i] := 0; end; + less code to write - less readability I hope the syntax is correct. Pascal - long time no see ^^
23rd Feb 2017, 6:40 PM
Tashi N
Tashi N - avatar
+ 3
Phew! Back to my old Pascal times... var a: array [0..8, 0..8] of integer; begin a[0,0] := 0; a[0,1] := 1; a[0,2] := 0; { ... I guess you get the point } end;
23rd Feb 2017, 6:11 PM
Álvaro
+ 3
@Tashi N: totally agree with the initialization using loops... It's just that I wasn't able to identify a clear pattern for the values above :-(
23rd Feb 2017, 7:04 PM
Álvaro