program ayam_goreng;
uses wincrt;
var
i,b:byte;
jenis,kdjenis:array [1..50]of string;
banyak,jmlharga,harga:array [1..50]of real;
totb,ppn,totjml,total:real;
begin
clrscr;
writeln('Joean Swalayan');
writeln('===================== ===');
writeln('Kode Jenis potong Harga');
writeln('===================== ========');
writeln('D Dada 3000 ');
writeln('P Paha 2500 ');
writeln('S Sayap 1500 ');
writeln('===================== ========');
write('Masukan Jumlah Jenis : ');readln(b);
for i:=1 to b do
begin
writeln;
writeln('Jenis Ayam ke- ',i);
writeln;
write('Jenis Ayam Bagian [D/P/S] : ');readln(kdjenis[i]);
write('Jumlah Beli / Potong : ');readln(banyak[i]);
end;
writeln; clrscr;
writeln(' PROGRAM AYAM GORENG FRIED CHICKEN');
writeln('===================== ============================== ===================');
writeln('NO JENIS POTONG HARGA SATUAN BANYAK BELI JUMLAH HARGA ');
writeln;
totb:=0;
for i:=1 to b do
begin
if kdjenis[i]='D' then
begin
jenis[i]:='Dada';
harga[i]:=3000;
end
else if kdjenis[i]='P' then
begin
jenis[i]:='Paha';
harga[i]:=2500;
end
else if kdjenis[i]='S' then
begin
jenis[i]:='Sayap';
harga[i]:=1500;
end
else
begin
jenis[i]:='Kepala';
harga[i]:=1000;
end;
jmlharga[i]:=harga[i]*banyak[i ];
totb:=totb+jmlharga[i];
ppn:=totb*0.1;
totjml:=totjml+banyak[i];
total:=totb+ppn
end;
for i:=1 to b do
begin
writeln(i:1,jenis[i]:9,harga[i ]:14:0,banyak[i]:18:0,jmlharga [i]:19:0);
end;
writeln('===================== ============================== ==============');
writeln(' Jumlah Potong :',totjml:2:0);
writeln(' Jumlah bayar :',totb:2:0);
writeln(' PPN 10 % : ',ppn:2:0);
writeln(' Total bayar : ',total:2:0);
readln;
end.
uses wincrt;
var
i,b:byte;
jenis,kdjenis:array [1..50]of string;
banyak,jmlharga,harga:array [1..50]of real;
totb,ppn,totjml,total:real;
begin
clrscr;
writeln('Joean Swalayan');
writeln('=====================
writeln('Kode Jenis potong Harga');
writeln('=====================
writeln('D Dada 3000 ');
writeln('P Paha 2500 ');
writeln('S Sayap 1500 ');
writeln('=====================
write('Masukan Jumlah Jenis : ');readln(b);
for i:=1 to b do
begin
writeln;
writeln('Jenis Ayam ke- ',i);
writeln;
write('Jenis Ayam Bagian [D/P/S] : ');readln(kdjenis[i]);
write('Jumlah Beli / Potong : ');readln(banyak[i]);
end;
writeln; clrscr;
writeln(' PROGRAM AYAM GORENG FRIED CHICKEN');
writeln('=====================
writeln('NO JENIS POTONG HARGA SATUAN BANYAK BELI JUMLAH HARGA ');
writeln;
totb:=0;
for i:=1 to b do
begin
if kdjenis[i]='D' then
begin
jenis[i]:='Dada';
harga[i]:=3000;
end
else if kdjenis[i]='P' then
begin
jenis[i]:='Paha';
harga[i]:=2500;
end
else if kdjenis[i]='S' then
begin
jenis[i]:='Sayap';
harga[i]:=1500;
end
else
begin
jenis[i]:='Kepala';
harga[i]:=1000;
end;
jmlharga[i]:=harga[i]*banyak[i
totb:=totb+jmlharga[i];
ppn:=totb*0.1;
totjml:=totjml+banyak[i];
total:=totb+ppn
end;
for i:=1 to b do
begin
writeln(i:1,jenis[i]:9,harga[i
end;
writeln('=====================
writeln(' Jumlah Potong :',totjml:2:0);
writeln(' Jumlah bayar :',totb:2:0);
writeln(' PPN 10 % : ',ppn:2:0);
writeln(' Total bayar : ',total:2:0);
readln;
end.
Tidak ada komentar:
Posting Komentar