program tinh;
uses crt;
var a,b,tong,hieu,tich:integer;
thuong:real;
begin
clrscr;
write('nhap so nguyen duong a:');readln(a);
write('nhap so nguyen duong b:');readln(b);
tong:=a+b;
if a>=b then hieu:=a-b else hieu:=b-a;
tich:=a*b;
if a>=b then thuong:=a/b else thuong:=b/a;
writeln('tong la:',tong);
writeln('hieu la:',hieu);
writeln('tich la:',tich);
writeln('thuong la:',thuong:0:2);
readln;
end.
chúc bạn học tốt!!
uses crt;
var a,b:longint;
tong,hieu,tich,thuong:int64;
begin
clrscr;
readln(a,b);
tong:=a+b;
hieu:=a-b;
tich:=a*b;
thuong:=a/b;
writeln(tong,' ',hieu,' ',tich,' ',thuong);
readln
end.
Ngắn gọn nè bạn. Thi tốt!