Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
22
Task/Fixed-length-records/Pascal/fixed-length-records.pas
Normal file
22
Task/Fixed-length-records/Pascal/fixed-length-records.pas
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
program reverseFixedLines(input, output, stdErr);
|
||||
const
|
||||
lineLength = 80;
|
||||
var
|
||||
// in Pascal, `string[n]` is virtually an alias for `array[1..n] of char`
|
||||
line: string[lineLength];
|
||||
i: integer;
|
||||
begin
|
||||
while not eof() do
|
||||
begin
|
||||
for i := 1 to lineLength do
|
||||
begin
|
||||
read(line[i]);
|
||||
end;
|
||||
|
||||
for i := lineLength downto 1 do
|
||||
begin
|
||||
write(line[i]);
|
||||
end;
|
||||
writeLn();
|
||||
end;
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue