Program enot;
VAR p: array [1..7,1..9] of integer;
i,j,s:integer;
begin
s:=0;
for i:= 1 to 7 do
for j:= 1 to 9
do p[i,j]:= random (61)-25;
for i:= 1 to 7 do
begin
for j:= 1 to 9 do
begin
if p[i,j]<0 then s:=s+p[i,j];
write(p[i,j]:5);
end;
writeln();
end;
writeln(s);
<span>end.</span>
Дано:
N1=16
N2=32
K1=100
K2=50
Найти: I
Формулы: N=2i, I=k*I
Решение:
16i=4, 32i=5
100*5=500
50*5=250
Ответ: 500 и 250
Var d:array[1..10] of integer;
s,i:integer;
Begin
s:=1;
For i:=1 to 10 do
begin
readln(d[i]);
If d[i]<>0
Then S:=S*d[i];
end;
Writeln(S);
end.