program SUMMA;
const M = 10; {число строк таблицы}
N = 10; {число столбцов таблицы}
type LINE = array [1..n] of integer;
TAB = array [1..m] of LINE;
var s, i, j:integer; MAS: TAB;
procedure VVODMASSIV (var MAS: TAB);
begin
¦ for i := 1 to M do
¦ for j := 1 to N do
¦ readln (MAS [i][j]);
end;
procedure VIVODMASSIV (var MAS:TAB);
begin
¦ for i := 1 to M do
¦ begin
¦ ¦ for j := 1 to N do
¦ ¦ write (MAS [i][j]:4,' '); writeln;
¦ end;
end;
procedure OBRABOTKA (MAS: TAB; var SUM: integer);
begin
¦ SUM := 0;
¦ for i := 1 to M do
¦ for j := 1 to N do
¦ if j > i then SUM := SUM + MAS [i][j];
end;
begin
| VVODMASSIV (MAS);
| writeln ('исходный массив'); VIVODMASSIV (MAS);
| OBRABOTKA (MAS, s); writeln;
| writeln ('сумма элементов = ',s);
end.
const M = 10; {число строк таблицы}
N = 10; {число столбцов таблицы}
type LINE = array [1..n] of integer;
TAB = array [1..m] of LINE;
var s, i, j:integer; MAS: TAB;
procedure VVODMASSIV (var MAS: TAB);
begin
¦ for i := 1 to M do
¦ for j := 1 to N do
¦ readln (MAS [i][j]);
end;
procedure VIVODMASSIV (var MAS:TAB);
begin
¦ for i := 1 to M do
¦ begin
¦ ¦ for j := 1 to N do
¦ ¦ write (MAS [i][j]:4,' '); writeln;
¦ end;
end;
procedure OBRABOTKA (MAS: TAB; var SUM: integer);
begin
¦ SUM := 0;
¦ for i := 1 to M do
¦ for j := 1 to N do
¦ if j > i then SUM := SUM + MAS [i][j];
end;
begin
| VVODMASSIV (MAS);
| writeln ('исходный массив'); VIVODMASSIV (MAS);
| OBRABOTKA (MAS, s); writeln;
| writeln ('сумма элементов = ',s);
end.