помогите пожалуйста доработать програмку.
дан текст, найти найбльшее кол-во цифр, которое идёт в нём подряд.
Код:
program lab20_z21_char;
{$APPTYPE CONSOLE}
uses
SysUtils;
const
n=7;
var
s:array[1..n] of char;
i,j:byte;
begin
writeln ('input string s');
for i:=1 to n do
read (s[i]);
i:=1;
while i<=length(s) do
if (s[i]>='0') and (s[i]<='9') then
begin
j:=i+1;
while (s[i]>='0') do
begin
while (s[i]>='0') and (s[i]<='9') do
inc(j);
writeln (j-1);
j:=j+1;
end;
end
else inc(i);
readln;
readln
{ TODO -oUser -cConsole Main : Insert code here }
end.
Admin: Пользуемся тегами!