Skip to content

Commit

Permalink
Read file of integers in ALGOL 60
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd committed Dec 2, 2023
1 parent 255e7de commit cab0114
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions day03/src/day03.alg
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
begin
comment reading;
integer n;
n := 54321;
ininteger(2,n);
outinteger(1,n)
comment File 1 is stdout, file 2 is our input file;
integer i, n;
outstring(1, "Hello world!\n");
for i := 0 step 1 until 2 do
begin
ininteger(2, n);
outinteger(1, n);
end
end

0 comments on commit cab0114

Please sign in to comment.