Const m = 3; n = 4; var a: array[1..m, 1..n] of integer; i, j, k, t: integer;
begin Randomize; Writeln('Исходный массив'); for i := 1 to m do begin for j := 1 to n do begin a[i, j] := Random(101) - 50; Write(a[i, j]:4) end; Writeln end; { Пузырьковая сортировка по возрастанию в столбцах } for j:=1 to n do for k := 1 to m-1 do for i := 1 to m-1 do if a[i,j] > a[i+1,j] then begin t := a[i,j]; a[i,j] := a[i+1,j]; a[i+1,j] := t end; Writeln('Сортировка по столбцам'); for i := 1 to m do begin for j := 1 to n do Write(a[i, j]:4); Writeln end end.
var a, b, s: real;
begin
readln(a, b);
s:=s*b;
writeln(s);
end.
2.
var a, b, c, d, s: real;
begin
readln(a, b, c, d);
s:=a+b+c+d;
writeln(s);
end.
3.
var a, b, c, mult: real;
begin
readlb(a, b, c);
mult:=a*b*c;
writeln(mult);
end.
4.
var a, h, s: real;
begin
readlb(a, h);
s:=a*h;
writeln(s);
end.
5.
var a, b, o: real;
begin
readln(a, b);
o:=a/b;
writeln(o);
end.
6.
const pi=3.14;
var r, l: real;
begin
readln(r);
l:=2*pi*r;
writeln(l);
end.
7.
const pi=3.14;
var r, s: real;
begin
readln(r);
s:=pi*sqr(r);
writeln(s);
end.
8.
var a, s: real;
begin
readln(a);
s:=sqr(a);
writeln(s);
end.
9.
var a, h, s: real;
begin
readln(a, h);
s:=a*h;
writeln(s);
end.
10. хз что это.
m = 3;
n = 4;
var
a: array[1..m, 1..n] of integer;
i, j, k, t: integer;
begin
Randomize;
Writeln('Исходный массив');
for i := 1 to m do
begin
for j := 1 to n do
begin
a[i, j] := Random(101) - 50;
Write(a[i, j]:4)
end;
Writeln
end;
{ Пузырьковая сортировка по возрастанию в столбцах }
for j:=1 to n do
for k := 1 to m-1 do
for i := 1 to m-1 do
if a[i,j] > a[i+1,j] then
begin t := a[i,j]; a[i,j] := a[i+1,j]; a[i+1,j] := t end;
Writeln('Сортировка по столбцам');
for i := 1 to m do
begin
for j := 1 to n do Write(a[i, j]:4);
Writeln
end
end.
Тестовое решение:
Исходный массив
49 -10 27 -22
46 42 -17 -12
34 -50 7 24
Сортировка по столбцам
34 -50 -17 -22
46 -10 7 -12
49 42 27 24