Mik chỉ làm 2 ý sau do ý đầu mik ko hiểu đề yêu cầu gì cả nên thứ lỗi nha
program Tin_hoc;
uses crt;
var x,y,i,UCLN:integer;
begin
clrscr;
write('Nhap X: ');readln(x);
write('Nhap Y: ');readln(y);
writeln('Tong cua X va Y la: ',x+y);
if x>=y then for i:= 1 to y do if (x mod i = 0) and (y mod i = 0) then UCLN:=i;
if x<=y then for i:= 1 to x do if (x mod i = 0) and (y mod i = 0) then UCLN:=i;
writeln('UCLN cua X va Y la: ',UCLN);
readln;
end.