- Joined
- Jan 6, 2011
- Messages
- 3,849
- Trophies
- 2
- Age
- 26
- Location
- Canada,New Jersey
- Website
- www.deenextreme.com
- XP
- 8,173
- Country
So recently I have been programming in pascal because I can, and I have encountered a serious problem with my compiler ABC pascal. Basically, it won't write anything in the output.txt file. Here's the code, but the problem is not in it (as far as I know):
And here is input.txt:
So, what may be the problem?
Code:
program strings;
var
U, V, S: string;
f1, f2: text;
begin
assign(f1, 'input.txt');
assign(f2, 'output.txt');
reset(f1);
rewrite(f2);
readln(f1, u);
readln(f1, v);
S:= u + v;
writeln(f2, S);
close(f1);
close(f2);
end.
And here is input.txt:
Code:
alan
john