+ 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} };
4 odpowiedzi
+ 7
@Alvaro: Unfortunately. There is not much to learn except typing -.-
+ 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 ^^
+ 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;
+ 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 :-(