Jater

Elena_string

Dec 25th, 2012
84
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var
  2. st:string; s,m,i:integer;
  3. begin
  4.      write('Vvedi stroku: ');
  5.      readln(st);
  6.      m:=0;
  7.      for i:=1 to length(st) do
  8.          if st[i]='a' then
  9.          begin
  10.             s:=0;
  11.             while(st[i]='a')do
  12.               begin
  13.               s:=s+1;
  14.               i:=i+1;
  15.               end;
  16.             if m<s then
  17.                m:=s;
  18.             i:=i-1;
  19.          end;
  20.      writeln(m);
  21.      readln;
  22. end.
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×