7. 找“six”

program ex_7;
var
     st : string;
     i, len : integer;
     found : boolean;
begin
     readln(st);
     len := length(st);
     for i := 1 to len-3 do
         if (st[i] = 's') and (st[i+1] = 'i') and (st[i+2] = 'x') then
         begin
              write(i, ' ');
              found := true;
         end;
     if not found then
        writeln('No find!');
     readln;
end.
posted @ 2010-03-14 19:19  SmartIOI  阅读(145)  评论(0)    收藏  举报
本站采用CC授权如需转载、引用文章,请务必附上作者及来源处。 Creative Commons License