Program n1; Uses CRT; Const n=20; Var a: array[1..n] of integer; i,k,s: integer; begin For i:=1 to n do begin; a[i]:=random(50)-25; write(a[i],' '); if (a[i] mod 5=0)and(a[i]<0) then begin k:=k+1; s:=s+a[i]; end; end; writeln('Kolichestvo =',k,' Summa=',s); readln end.
Program n1;
Uses CRT;
Const n=20;
Var a: array[1..n] of integer;
i,k,s: integer;
begin
For i:=1 to n do
begin;
a[i]:=random(50)-25;
write(a[i],' ');
if (a[i] mod 5=0)and(a[i]<0) then
begin
k:=k+1;
s:=s+a[i];
end;
end;
writeln('Kolichestvo =',k,' Summa=',s);
readln
end.