Uses crt; var n,i,j,l,sum,min:integer; a:array[1..20,1..20]of integer; begin clrscr; write('n='); readln(n); randomize; Writeln('Ishodnaja matrica:'); for i:=1 to n do begin for j:=1 to n do begin a[i,j]:=random(10); write(a[i,j]:3); end; writeln; end; For l:=1 to 2*n-1 do begin sum:=0; if l<=n then begin for i:=1 to l do for j:=1 to l do if j=l-i+1 then sum:=sum+a[i,j]; if sum<min then min:=sum; end else if l>n then begin for i:=l-n+1 to n do for j:=l-n+1 to n do if j=l-i+1 then sum:=sum+a[i,j]; if sum<min then min:=sum; end; writeln('Summa diagonali ',l,' = ',sum); end; writeln; readln end.
var n,i,j,l,sum,min:integer;
a:array[1..20,1..20]of integer;
begin
clrscr;
write('n=');
readln(n);
randomize;
Writeln('Ishodnaja matrica:');
for i:=1 to n do begin
for j:=1 to n do begin
a[i,j]:=random(10);
write(a[i,j]:3);
end;
writeln;
end;
For l:=1 to 2*n-1 do
begin
sum:=0;
if l<=n then
begin
for i:=1 to l do
for j:=1 to l do
if j=l-i+1 then sum:=sum+a[i,j];
if sum<min then min:=sum;
end
else if l>n then
begin
for i:=l-n+1 to n do
for j:=l-n+1 to n do
if j=l-i+1 then sum:=sum+a[i,j];
if sum<min then min:=sum;
end;
writeln('Summa diagonali ',l,' = ',sum);
end;
writeln;
readln
end.
begin
writeln('Введите букву');
readln(a);
case a of
'q': writeln('w');
'w': writeln('e');
'e': writeln('r');
'r': writeln('t');
't': writeln('y');
'y': writeln('u');
'u': writeln('i');
'i': writeln('o');
'o': writeln('p');
'p': writeln('a');
'a': writeln('s');
's': writeln('d');
'd': writeln('f');
'f': writeln('g');
'g': writeln('h');
'h': writeln('j');
'j': writeln('k');
'k': writeln('l');
'l': writeln('z');
'z': writeln('x');
'x': writeln('c');
'c': writeln('v');
'v': writeln('b');
'b': writeln('n');
'n': writeln('m');
'm': writeln('q');
end;
end.