Ответ без решения,пока что.
uses crt;
var a:array[0..50,0..50]of integer;
i,j,n:integer;
begin
readln(n);
for i:=1 to n do
begin
a[i,0]:=i;
a[0,i]:=i;
end;
for i:=1 to n do
for j:=1 to n do
begin
a[i,j]:=i*j;
end;
for i:=0 to n do
begin
for j:=0 to n do
begin
if (i=0) or (j=0) then
textcolor(lightgreen)
else
textcolor(white);
write(a[i,j]:4);
end;
writeln;
end;
end.