TM. PROGRAM MENGHITUNG HARGA FOTOCOPY-AN + DISCOUNTNYA.
program ABDIMAULANA_141510123;
uses crt;
var
jl,th : longint;
byr,dis : real;
hpl : byte;
begin
clrscr;
writeln('|=======================================|');
writeln('||=== PHOTOCOPY MURAH KITA KITA ===||');
writeln('|=======================================|');
writeln;
write (' Banyak Lembar yang di Photocopy : ');readln(jl);
writeln('_________________________________________');
writeln;
if jl >= 1000 then hpl := 100 else
if (jl <= 999) and (jl >= 500) then hpl := 150 else
if jl <= 499 then hpl := 200;
th := jl * hpl;
if th > 500000 then dis := 0.20 else
if (th < 500000) and(th > 300000) then dis := 0.10 else
if th < 300000 then dis := 0;
dis := th * dis;
byr := th - dis;
writeln;
writeln('>> Harga Per Lembar : Rp.',hpl);
writeln('>> Total Harga : Rp.',th);
writeln('>> Discont : Rp.',dis:3:0);
writeln('>> Pembayaran : Rp.',byr:3:0);
writeln('|=======================================|');
writeln;
writeln;
writeln(' |********************************|');
writeln(' |==THANKS FOR USING MY PROGRAMS==|');
writeln(' |==== ABDI MAULANA 141510123 ====|');
writeln(' |********************************|');
readln;
end.
Comments
Post a Comment