Program tinhtoan;
Var a,b,c,d : integer;
Begin
Write(‘Nhap hai so a,b :’);
Readln (a,b);
c:=a div b;
d:=a mod b;
Writeln(‘ Phan nguyen cua a va b la :’,c);
Writeln(‘ Phan du cua a va b la :’,d);
Readln;
End.
uses crt;
var a,b,c,d:integer;
begin
clrscr;
write('nhap so bi chia:'); readln(a);
repeat
write('nhap so chia:'); readln(b);
if b=0 then writeln('ban da nhap sai, yeu cau ban nhap lai');
until b<>0;
c:=a div b;
d:=a mod b;
writeln('thuong cua phep chia ',a,' cho ',b,' la: ',c);
writeln('so du cua phep chia ',a,' cho ',b,' la: ',d);
readln;
end.