program kembalian;
uses wincrt;
var
a,b:longint;
j,c,d,e,f,g,h,i,k:longint;
begin
writeln('---------------samsuri----------------+');
writeln('Masukkan
Nilai Uang');readln(a);
writeln('+---------------------------------+');
writeln('Masukkan
Nilai Harga Barang');readln(b);
writeln('+---------------------------------+');
j:=a-b;
writeln('kembalian=',j);
writeln('rinciannya
adalah sebagai berikut:!!!!');
c:=j div 50000;
d:=(j mod 50000)div
10000;
e:=(j mod 10000)div
5000;
f:=(j mod 5000)div
2000;
g:=(j mod 2000)div
1000;
h:=(j mod 1000)div
500;
i:=(j mod 500)div
200;
k:=(j mod 200)div
100;
writeln('',c,'.LEMBAR=50000');
writeln('',d,'.LEMBAR=10000');
writeln('',e,'.LEMBAR=5000');
writeln('',f,'.LEMBAR=2000');
writeln('',g,'.LEMBAR=1000');
writeln('',h,'.LEMBAR=500');
writeln('',i,'.LEMBAR=200');
writeln('',k,'.LEMBAR=100');
writeln;
writeln('TERIMAKASIH
BANYAK');
end.
|
Tidak ada komentar:
Posting Komentar