讨论 / 看一看错误在哪
zhumingjie10 2011-10-27 02:31:00
点我顶贴 收藏 删除
程序如下

[color=red]

program P51;

var

i,me,you:integer;

ans:ansistring;

st:string;

begin

while pos('E',st)=0 do begin

readln(st);

ans:=ans+st;

end;

i:=0;

repeat

me:=0;

you:=0;

repeat

inc(i);

case ans[i] of

'W':inc(me);

'L':inc(you);

end;

until (((me>=11) or (you>=11)) and (abs(me-you)>1)) or (ans[i]='E');

writeln(me,':',you);

until ans[i]='E';

writeln;

i:=0;

repeat

me:=0;

you:=0;

repeat

inc(i);

case ans[i] of

'W':inc(me);

'L':inc(you);

end;

until (((me=21) or (you=21)) and (abs(me-you)>1)) or (ans[i]='E');

writeln(me,':',you);

until ans[i]='E';

end.

[/color]

#1 苹果@2011-10-27 02:31:00
回复 删除
嘿呵呵呵呵呵呵呵

begin

while pos('E',st)=0 do begin

readln(st);

ans:=ans+st;

end;

这一段怎么结束不了啊....

查看更多回复
提交回复