program doitien;
uses crt;
var n,d,d1,d2,d3:longint;
begin
clrscr;
write('nhap n:');
readln(n );
d:=n div 50000
n:=n-d*50000;
d1:=n div 20000;
n:=n-d1*20000;
d2:=n div 10000;
n:=n-d2*10000;
d3:=n div 5000;
n:=n-d3*5000;
writeln('50000:',d);
writeln('20000:',d1);
writeln('10000:',d2);
writeln('5000:',d3);
readln;
end.
Đúng 0
Bình luận (0)