Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
20
Task/Loops-N-plus-one-half/Pascal/loops-n-plus-one-half.pas
Normal file
20
Task/Loops-N-plus-one-half/Pascal/loops-n-plus-one-half.pas
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
program numlist(output);
|
||||
|
||||
const MAXNUM: integer = 10;
|
||||
var
|
||||
i: integer;
|
||||
|
||||
begin
|
||||
{ loop 1: w/ if branching }
|
||||
for i := 1 to MAXNUM do
|
||||
begin
|
||||
write(i);
|
||||
if i <> MAXNUM then
|
||||
write(', ')
|
||||
end;
|
||||
writeln;
|
||||
{ loop 2: w/o if branching }
|
||||
for i := 1 to MAXNUM-1 do
|
||||
write(i, ', ');
|
||||
writeln(MAXNUM);
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue