循环的反向
for
循环从起始值向下迭代到包含终止值,作为倒计时示例。
program CountDown;
{$APPTYPE CONSOLE}
var
i : Integer;
begin
for i := 10 downto 0 do
WriteLn(i);
end.
输出:
10
9
8
7
6
5
4
3
2
1
0
for
循环从起始值向下迭代到包含终止值,作为倒计时示例。
program CountDown;
{$APPTYPE CONSOLE}
var
i : Integer;
begin
for i := 10 downto 0 do
WriteLn(i);
end.
输出:
10
9
8
7
6
5
4
3
2
1
0