Hello, i need help with a simple program about arrays, my goal is to obtain an arrangement like a matrix, but im having problems with the jump line, because i only get the result in one line, this is what i've got:
program project1;
uses
crt;
const
L=5;
var
T: array[1..L,1..L] of real;
n: real;
i,j: integer;
begin
write('write a number ');readln(n);
begin
For i:=1 to L do
begin
For j:=1 to L do
begin
T[i,j]:= n;
write(i,',',j,' ',T[i,j]*i*j:0:2,' ');
end;
end;
end;
readln;
end.
but if i add a 'writeln' between the 'for' cicles it only shows me the las line of the array (5,1 to 5,5) but does not show me the other and i have no idea why it does do this, anyone can help me?