Lembaran Uang

program lembaran_uang;

uses wincrt;

var

a,a1,b,b1,c,c1,d,d1,e,e1,f,f1,g,g1,h,h1,i,j,x:longint;

begin

writeln(‘PROGRAM LEMBARAN UANG’);

writeln(‘———————‘);

write(‘jumlah uang anda : ‘);read(x);

writeln;

a:=x div 100000;

a1:=x mod 100000;

b:=a1 div 50000;

b1:=a1 mod 50000;

c:=b1 div 20000;

c1:=b1 mod 20000;

d:=c1 div 10000;

d1:=c1 mod 10000;

e:=d1 div 5000;

e1:=d1 mod 5000;

f:=e1 div 2000;

f1:=e1 mod 2000;

g:=f1 div 1000;

g1:=f1 mod 1000;

h:=g1 div 500;

h1:=g1 mod 500;

i:=h1 div 200;

j:=h1 mod 200;

writeln(‘uang anda adalah : ‘);

writeln(a,’ lembar Rp. 100.000,00′);

writeln(b,’ lembar Rp. 50.000,00′);

writeln(c,’ lembar Rp. 20.000,00′);

writeln(d,’ lembar Rp. 10.000,00′);

writeln(e,’ lembar Rp. 5.000,00′);

writeln(f,’ lembar Rp. 2.000,00′);

writeln(g,’ lembar Rp. 1.000,00′);

writeln(h,’ koin Rp. 500,00′);

writeln(i,’ koin Rp. 200,00′);

writeln(j,’ koin Rp. 100,00′);

end.

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

w

Connecting to %s

%d blogger menyukai ini: