--------------------------------------------------------------------------------------------------------------------------
program Menghitung_hasil_tukar_uang;
{I.S. : user memasukan sejumlah Uang}
{F.S. : menampilkan Hasil Tukar Uang}
uses crt;
var
seribu,limaratus,Seratus,Limapuluh,Duapuluhlima : integer;
JmlUang, Sisa : integer;
begin
//memasukan uang
writeln('memasukan Uang');
writeln('==============');
write('JmlUang : '); readln(JmlUang);
seribu :=JmlUang div 1000;
Sisa :=JmlUang mod 1000;
limaratus :=Sisa div 500;
Seratus :=sisa mod 500;
Limapuluh :=sisa div 100;
Duapuluhlima :=sisa mod 100;
//menampilkan Hasil Perhitungan
writeln('menampilkan Hasil Tukar Uang');
writeln('===============================');
writeln('Jumlah Uang : ',JmlUang);
writeln('===============================');
writeln('1000 : ',seribu);
writeln('500 : ',limaratus);
writeln('100 : ',seratus);
writeln('50 : ',Limapuluh);
writeln('25 : ',Duapuluhlima);
readln
end.
--------------------------------------------------------------------------------------------------------------------------
Download Scriptnya :
catatan :
hargailah tulisan orang lain, jika anda mengcopy-paste harap cantumkan link sumber.
0 komentar