program detail_uang;
uses wincrt;
var
a,b,c,d,e,f,g,j,k,l,m,n:longint;
begin
write ('nilai a='); readln(a);
c:=a mod 50000;
j:=a div 50000;
d:=c mod 10000;
k:=c div 10000;
e:=d mod 5000;
l:=d div 5000;
f:=e mod 1000;
m:=e div 1000;
g:=f mod 500;
n:=f div 500;
if j>0then writeln ('50000=',j) else writeln('');
if k>0 then writeln ('10000=',k) else writeln('');
if l>0 then writeln ('5000=',l) else writeln('');
if m>0 then writeln ('1000=',m)else writeln('');
if n>0then writeln('500=',n)else writeln('');
end.
Tidak ada komentar:
Posting Komentar