Найти и вывести все числа строки. Если их нет, то сообщить. (Pascal)
Answers & Comments
HRAshton
Var a, b: string; i: integer; begin readln(a); for i := 1 to length(a) do if (a[i] in ['0'..'9']) then b := b + a[i]; if (length(b) = 0) then Writeln('{ No nums }') else Writeln(b); end.
Answers & Comments
i: integer;
begin
readln(a);
for i := 1 to length(a) do
if (a[i] in ['0'..'9']) then b := b + a[i];
if (length(b) = 0) then
Writeln('{ No nums }')
else
Writeln(b);
end.