Var A,Min,N:integer;
Begin
Min:=30001;
Read(N);
For N:= 1 to N do
Begin
Read(A);
if (A mod 7 = 0)and(A < Min) then Min:=A;
End;
Write(Min)
End.
Function ProdDig(n:longint):longint;
var
p:longint;
begin
p:=1;
while n>0 do begin
p:=p*(n mod 10);
n:=n div 10
end;
ProdDig:=p
end;
var
f:Text;
a,b,c:longint;
begin
Assign(f,'abc.txt');
Reset(f);
Readln(f,a,b,c);
Close(f);
Assign(f,'abcout.txt');
Rewrite(f);
Writeln(f,ProdDig(a+b+c));
Close(f)
end.
<em><u>Вариант без использования функции:</u></em>
var
f:Text;
a,b,c,p,s:longint;
begin
Assign(f,'abc.txt');
Reset(f);
Readln(f,a,b,c);
Close(f);
s:=a+b+c; p:=1;
while s>0 do begin
p:=p*(s mod 10);
s:=s div 10
end;
Assign(f,'abcout.txt');
Rewrite(f);
Writeln(f,p);
Close(f)
end.
А) (a /\ (b\/c)) --> d
b) (-a\/-b) --> (c/\d)
c) (a /\ b)≈(c\/-d)
помоему так