Selasa, 21 Maret 2017

PASCAL 2

program bayu;
{$APPTYPE CONSOLE}
uses
  SysUtils;
var
a,b,c,d,e,t1,t2,t3,t4,t5,ts,dc:real;
ja,jb,jc,jd,je,ko:integer;
begin
write('masukan jumlah kue A : '); readln(ja);
write('masukan jumlah kue B : '); readln(jb);
write('masukan jumlah kue C : '); readln(jc);
write('masukan jumlah kue D : '); readln(jd);
write('masukan jumlah kue E : '); readln(je);
a:=7500;
b:=9500;
c:=12500;
d:=12000;
e:=55000;
ko:=ja+jb+jc+jd+je;
t2:=jd*d;
t1:=jc*c;
t3:=je*e;
t4:=ja*a;
t5:=jb*b;
if(ja>=20)then
begin
dc:=(ja*a)*0.07;
t4:=t4-dc;
end;
if(jb>=20)then
begin
dc:=(jb*b)*0.07;
t5:=t5-dc;
end;
if(jc>=40)then
begin
dc:=(jc*c)*0.1;
t1:=t1-dc;
end;
if(jd>=40)then
begin
dc:=(jd*d)*0.1;
t2:=t2-dc;
end;
ts:=t1+t2+t3+t4+t5;
if(ko>100)then
begin
dc:=ts*0.15;
ts:=ts-dc;
end;
write('Total Harga : ',ts:1:0);
readln;
  { TODO -oUser -cConsole Main : Insert code here }
end.

Tidak ada komentar:

Posting Komentar