Program Pifagor; uses crt; const n=10; var x,y:integer; begin writeln(''); writeln('* PIFAGOR *'); writeln('* (таблица умножения) *'); writeln(''); write('* * '); for y:=1 to n do begin write(y:2); if y<n then write(' | ') else writeln(' * '); end; writeln(''); for x:=1 to n do begin write('* ',x:2, ' * '); for y:=1 to n do begin write(x*y:2); if y<n then write(' | ') end; if x*y<100 then writeln(' * ') else writeln('* '); if x<10 then writeln('++') else writeln(''); end; end.
Program Pifagor;
uses crt;
const n=10;
var
x,y:integer;
begin
writeln('');
writeln('* PIFAGOR *');
writeln('* (таблица умножения) *');
writeln('');
write('* * ');
for y:=1 to n do
begin
write(y:2);
if y<n then write(' | ')
else writeln(' * ');
end;
writeln('');
for x:=1 to n do
begin
write('* ',x:2, ' * ');
for y:=1 to n do
begin
write(x*y:2);
if y<n then write(' | ')
end;
if x*y<100 then writeln(' * ')
else writeln('* ');
if x<10 then writeln('++')
else writeln('');
end;
end.
Паскаль
uses crt;
var n,m:integer;
begin
for n:=1 to 9 do
begin
for m:=1 to 9 do
write(m*n:5);
writeln;
end;
end.