" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
uses crt;
var n_blmdisk,n_sudahdisk,diskon,potongan : real;
begin
clrscr;
writeln('Mencari nilai Diskon');
write('Harga sebelum di Diskon: Rp. ');
read(n_blmdisk);
write('Harga sesudah di Diskon: Rp. ');
read(n_sudahdisk);
potongan := (n_blmdisk-n_sudahdisk);
writeln('-------------------------');
writeln('Potongan : Rp.',potongan:4:2);
diskon := (potongan/n_blmdisk)*100;
write('Diskon : ',diskon:4:2);write('%');
readln;
readln;
end.