CÁC BẠN GIÚP MÌNH NHÉ “Viết chương trình đọc 2 số nguyên a,b từ tệp Max.inp. Đưa ra tệp Max.out số lớn nhất “.
0 bình luận về “CÁC BẠN GIÚP MÌNH NHÉ “Viết chương trình đọc 2 số nguyên a,b từ tệp Max.inp. Đưa ra tệp Max.out số lớn nhất “.”
var f1,f2:text; a,b:integer; begin assign(f1,’Max.inp’); reset(f1); assign(f2,’Max.out’); rewrite(f2); readln(f1,a,b); if a>b then write(f2,a) else if a<b then write(f2,b) else write(f2,a,’=’,b); close(f1); close(f2); end.
var f1,f2:text;
a,b:integer;
begin
assign(f1,’Max.inp’);
reset(f1);
assign(f2,’Max.out’);
rewrite(f2);
readln(f1,a,b);
if a>b then write(f2,a) else
if a<b then write(f2,b) else write(f2,a,’=’,b);
close(f1); close(f2);
end.