Const N = 4; C = 7; Var A:array[1..N,1..N] of integer; i,j:integer; S:real; Begin Randomize; WriteLn('Исходный массив:'); S:=0; For i:= 1 to n do Begin For j:= 1 to N do Begin A[i,j]:=random(21)-10; Write(A[i,j]:3,' '); if A[i,j] < C then S:=S+A[i,j]; End; WriteLn End; WriteLn('S = ',S); End.
N = 4;
C = 7;
Var
A:array[1..N,1..N] of integer;
i,j:integer;
S:real;
Begin
Randomize;
WriteLn('Исходный массив:');
S:=0;
For i:= 1 to n do
Begin
For j:= 1 to N do
Begin
A[i,j]:=random(21)-10;
Write(A[i,j]:3,' ');
if A[i,j] < C then S:=S+A[i,j];
End;
WriteLn
End;
WriteLn('S = ',S);
End.