Pascal

2010-10-03 8:37 am
我個program係咁啲

begin
writeln('NO.');
readln(a);
case a of
1,2,3: writeln('Table A');
else
writeln('Table B');
end;
end.

我想問有冇辦法可以每次RUN完都可以維持係OUTPUT個畫面同埋無限次再WRITELN多一次NO同READLN(A)???

回答 (1)

2010-10-03 10:31 am
✔ 最佳答案
只要在外面加個 Repeat .... Until 就得。
例如

Repeat
writeln('NO.');
readln(a);
case a of
1,2,3: writeln('Table A');
else
writeln('Table B');
Until a=0;


收錄日期: 2021-04-26 11:29:59
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20101003000051KK00085

檢視 Wayback Machine 備份