
21.11.2011, 14:10
|
Так проходящий
|
|
Регистрация: 18.07.2011
Сообщения: 805
Версия Delphi: 7Lite
Репутация: 6063
|
|
PHP код:
function check(s: string; c: char='e'; num: Integer=5): Boolean;
var i, n: integer;
begin
result := false;
n := 0;
i := 1;
while i <= length(s) do
begin
if s[i] = c then Inc(n) else n := 0;
if n = num then begin
result := true;
break;
end;
Inc(i)
end;
end;
|