Program_penjualan ;
uses crt ;
var pembelian,potongan : integer ;
begin
write (‘ total pembelian ‘ ); readln (pembelian);
case pemotongan of
=10000 : potongan := 1000;
=100000 : potongan := 10000;
end;
writeln (‘ jumlah pembelian : ‘ ,pembelian) ;
writeln (‘ potongan : ‘ ,potongan) ;
write ( ‘ jumlah bayar : ‘ ,pembelian – potongan) ;
readln ;
end.
Program Discount;
Uses wincrt;
Var
Nama:string;
Jumlah, Diskon, Bayar:real;
Begin
writeln('Program Discount');
writeln('Akim Seh(S1) STMIK Cikarang');
writeln('==================================');
repeat
writeln(' ');
write('Masukkan Nama Anda : ');
readln(Nama);
write('Masukkan Jumlah Pembelian = Rp ');
readln(Jumlah);
Diskon := 0;
if Jumlah>65000 then Diskon := Jumlah*0.1;
Bayar := Jumlah-Diskon;
writeln(' ');
writeln('Jumlah Pembelian = Rp',Jumlah:10:2);
writeln('Jumlah Discount = Rp',Diskon:10:2);
writeln('==================================');
writeln('Jumlah Pembayaran = Rp',Bayar:10:2);
writeln('Terima Kasih ',Nama);
until keypressed;
readln;
End.
Program kasir_Array;
Uses Wincrt;
Type Kasir = record
no_trans, tgl, nama, nm_brg : String[10];
kd_brg, jml : byte;
hrg, tot : real;
End;
Var
Data : Array [1..100] of Kasir;
Ul : Char;
i,n, x : Integer;
jml_penjualan : real;
Begin
Repeat
Clrscr;
i:=i+1;
Writeln(' ZERO COMPUTERS AND GAMING ');
Writeln(' Jl.RE Martadinata no.212 Pekalongan ');
Writeln('========================================');
Writeln;
writeln(' Form Transaksi ');
writeln;
Writeln('Data Ke-',i);
Writeln;
Write('No Transaksi : ');Readln(Data[i].no_trans);
Write('Tanggal : ');Readln(Data[i].tgl);
Write('Nama Pembeli : ');Readln(Data[i].nama);
Write('Kode Barang : ');Readln(Data[i].kd_brg);
if Data[i].kd_brg = 1 then
begin
Data[i].nm_brg :='Processor Core i3';
Data[i].hrg :=1131000;
end
else if Data[i].kd_brg = 2 then
begin
Data[i].nm_brg :='Printer';
Data[i].hrg :=500000;
end
else if Data[i].kd_brg = 3 then
begin
Data[i].nm_brg :='Harddisk';
Data[i].hrg :=700000;
end
else if Data[i].kd_brg = 4 then
begin
Data[i].nm_brg :='Flash Disk';
Data[i].hrg :=100000;
end
else if Data[i].kd_brg = 5 then
begin
Data[i].nm_brg :='Mouse';
Data[i].hrg :=125000;
end
else if Data[i].kd_brg = 6 then
begin
Data[i].nm_brg :='VGA Nvidia';
Data[i].hrg :=400000;
end
else if Data[i].kd_brg = 7 then
begin
Data[i].nm_brg := 'Memory DDR3';
Data[i].hrg := 235000;
end
else if data[i].kd_brg = 8 then
begin
data[i].nm_brg := 'Monitor';
data[i].hrg := 750000;
end;
Writeln('Nama Barang : ',Data[i].nm_brg);
Writeln('Harga : ',Data[i].hrg:0:0);
Write ('Jumlah Beli : ');Readln(Data[i].jml);
Data[i].tot:=Data[i].jml*Data[i].hrg;
writeln('Total Bayar : ',Data[i].tot:0:0);
Writeln;
write('Tambah Data (Y/T) : ');readln(Ul);
until upcase (Ul) <> 'Y';
n:=i;
Clrscr;
gotoxy(1,1);Write('=========================== ZERO COMPUTERS AND GAMING ==========================');
gotoxy(1,2);Write('=========================================================================');
gotoxy(1,3);write('|No.Tran |Tanggal |Nama Pembeli |Nama Barang |Harga |Jumlah |Total |');
gotoxy(1,4);Write('=========================================================================');
For x := 1 to n do
begin
gotoxy(1,x+4);write('|');
gotoxy(2,x+4);write(x);
gotoxy(10,x+4);write('|');
gotoxy(11,x+4);write(data[x].tgl);
gotoxy(19,x+4);write('|');
gotoxy(20,x+4);write(data[x].nama);
gotoxy(33,x+4);write('|');
gotoxy(34,x+4);write(data[x].nm_brg);
gotoxy(47,x+4);write('|');
gotoxy(48,x+4);write(data[x].hrg:0:0);
gotoxy(59,x+4);write('|');
gotoxy(60,x+4);write(data[x].jml);
gotoxy(67,x+4);write('|');
gotoxy(68,x+4);write(data[x].tot:0:0);
gotoxy(80,x+4);write('|');
jml_penjualan:=jml_penjualan+Data[x].tot;
end;
Write('================================================================================');
Writeln('Jumlah Transaksi : ', i);
Writeln('Jumlah Penjualan : Rp.',jml_penjualan:0:0);
End.
Demikianlah listing program penjualan, semoga bermanfaat. Baca juga program persamaan kuadrat.
0 Response to "program penjualan"
Post a Comment