Программа: const m=7; n=8; var t:array[1..m,1..n] of integer; i,j:integer; s,max:real; begin Randomize; writeln('Результаты измерений:'); writeln(' 0 3 6 9 12 15 18 21'); writeln(' '); for i:=1 to m do begin for j:=1 to n do begin t[i,j]:=random(10)-5; write(t[i,j]:4); end; writeln; end; max:=-200; for i:=1 to m do begin s:=0; for j:=1 to n do s:=s+t[i,j]; s:=s/n; if s>max then max:=s; end; writeln('max = ',max:5:1); end.
const m=7; n=8;
var t:array[1..m,1..n] of integer;
i,j:integer; s,max:real;
begin
Randomize;
writeln('Результаты измерений:');
writeln(' 0 3 6 9 12 15 18 21');
writeln(' ');
for i:=1 to m do
begin
for j:=1 to n do
begin
t[i,j]:=random(10)-5;
write(t[i,j]:4);
end;
writeln;
end;
max:=-200;
for i:=1 to m do
begin
s:=0;
for j:=1 to n do s:=s+t[i,j];
s:=s/n;
if s>max then max:=s;
end;
writeln('max = ',max:5:1);
end.
Пример:
Результаты измерений:
0 3 6 9 12 15 18 21
-4 4 2 -4 0 -1 4 1
-5 -2 2 3 4 0 -5 -3
-4 -4 2 0 -3 -1 -1 -4
-5 -3 4 -3 -4 1 -4 3
4 -1 -5 -1 -5 2 1 -1
-1 2 3 -1 -5 3 2 4
1 -5 -5 -1 0 0 1 2
max = 0.9
' 123456789
CLS
PRINT MID$(w, 3, 1) + LEFT$(w, 1) + RIGHT$(w, 1)
PRINT LEFT$(w, 1) + RIGHT$(w, 1) + MID$(w, 2, 1) + MID$(w, 6, 1)
PRINT MID$(w, 4, 5)
PRINT RIGHT$(w, 2) + MID$(w, 4, 1)
PRINT LEFT$(w, 1) + MID$(w, 3, 1) + MID$(w, 2, 3)
PRINT MID$(w, 4, 1) + RIGHT$(w, 4)
PRINT MID$(w, 5, 3) + RIGHT$(w, 1)
PRINT MID$(w, 4, 1) + MID$(w, 3, 1) + MID$(w, 5, 2)
PRINT MID$(w, 2, 3) + RIGHT$(w, 1)
PRINT RIGHT$(w, 2) + RIGHT$(w, 2)
Результат выполнения программы
опа
пара
грамм
маг
порог
гамма
рама
гора
рога
мама