S
stepansiy1
Код:
var sn,s:string;
l,k,kod:integer;
v,p:real;
begin
writeln('Введите строку');
readln(s);
l:=length(s);
p:=1; k:=1;
repeat
sn:='';
while (s[k]>='0')and(s[k]<='9')and(k<=l) do
begin
sn:=sn+s[k];
k:=k+1;
end;
if sn<>'' then
begin
val(sn,v,kod);
p:=p*v;
end;
k:=k+1;
until k>l;
writeln(' p=',p);
end.