Program Project1;
var m:array of integer; n, i, summ:integer;
begin
repeat
write('n: '); readln(n);
SetLength(m, Length(m)+1);
m[Length(m)-1]:=n;
until n=0;
SetLength(m, Length(m)-1);
n:=0; summ:=0;
for i:=0 to Length(m)-1 do begin
if m[i]>12 then begin
inc(n);
inc(summ, m[i]);
end;
end;
Writeln('Result:=', summ/n);
readln;
end.
2) ---------------------------------------------------------------------------------------
program Project1;
var n, t, res: integer;
begin
write('N:=');readln(n);
res:=1;
while n>0 do begin
t:=(n mod 10);
if t<4 then res:=res*t;<br> n:=n div 10;
end;
writeln('Result:=', res);
readln;
end.