Skip to content

Instantly share code, notes, and snippets.

@tuankiet65
Created April 4, 2013 11:13
Show Gist options
  • Save tuankiet65/5309565 to your computer and use it in GitHub Desktop.
Save tuankiet65/5309565 to your computer and use it in GitHub Desktop.
Đọc từ file ABC.txt gồm các số, xuất ra BCD.txt số lớn nhất
program abc_bcd;
uses crt;
var t, tout: text;
max, tmp: int64;
begin
clrscr;
assign(t, 'ABC.txt');
reset(t);
while not eoln(t) do begin
read(t, tmp);
if tmp>max then max:=tmp;
end;
close(t);
assign(tout, 'BCD.txt');
rewrite(tout);
write(tout, max);
close(tout);
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment