简单的循环
for
循环从起始值迭代到包含终止值。
program SimpleForLoop;
{$APPTYPE CONSOLE}
var
i : Integer;
begin
for i := 1 to 10 do
WriteLn(i);
end.
输出:
1
2
3
4
5
6
7
8
9
10
for
循环从起始值迭代到包含终止值。
program SimpleForLoop;
{$APPTYPE CONSOLE}
var
i : Integer;
begin
for i := 1 to 10 do
WriteLn(i);
end.
输出:
1
2
3
4
5
6
7
8
9
10