Program Nota Pembelian Di Pascal
program nota;
uses crt;
type
databrg=record
namabrg:string[15];
hargabrg:real;
kode:string[5];
jml:integer;
tot:real;
end;
var
jumlahbrg,i,j:byte;
totalharga:real;
tgl,nama,alamat : string;
barang:array[1..50] of databrg;
{Masukan Data}
begin
clrscr;
write('Tanggal Pembelian: ');readln(tgl);
write('Nama Pembeli : ');readln(nama);
write('Alamat : ');readln(alamat);
write('Jumlah Pembelian : ');readln(jumlahbrg);
for i :=1 to jumlahbrg do
begin
writeln;writeln('Barang ke ',i:2);
with barang[i]do
begin
write('Kode barang : ');readln(kode);
write('Nama Barang : ');readln(namabrg);
write('harga satuan : ');readln(hargabrg);
write('jumlah barang: ');readln(jml);
end;
end;
{Menampilkan Hasil}
clrscr;
writeln(' NOTA BELANJA BARANG');
writeln(' TOKO ABADI');
writeln(' Jl. Suka Ngawur No.4 Bangkalan');
writeln;
writeln('Tanggal Pembelian: ',tgl);
writeln('Nama Pembeli : ',nama);
writeln('Alamat : ',alamat);
writeln('------------------------------------------------------------------------------');
writeln('No | Kode barang | Nama Barang | harga satuan(Rp) | jumlah | hargaxjumlah(Rp)');
writeln('------------------------------------------------------------------------------');
totalharga:=0;
for i:= 1 to jumlahbrg do
begin
with barang[i]do
begin
totalharga:=totalharga+(hargabrg*jml);
tot:=hargabrg*jml;
write(i,' ');
write(kode,' ');
write(namabrg:10,' ');
write(hargabrg:10:0,' ');
write(jml,' ');
writeln(tot:10:0);
end;
end;
writeln('------------------------------------------------------------------------------');
writeln(' Total Pembelian : ',totalharga:10:0);
writeln('------------------------------------------------------------------------------');
writeln(' TERIMA KASIH ');
readln;
donewincrt;
end.
Untuk lebih jelasnya lihat Disini
uses crt;
type
databrg=record
namabrg:string[15];
hargabrg:real;
kode:string[5];
jml:integer;
tot:real;
end;
var
jumlahbrg,i,j:byte;
totalharga:real;
tgl,nama,alamat : string;
barang:array[1..50] of databrg;
{Masukan Data}
begin
clrscr;
write('Tanggal Pembelian: ');readln(tgl);
write('Nama Pembeli : ');readln(nama);
write('Alamat : ');readln(alamat);
write('Jumlah Pembelian : ');readln(jumlahbrg);
for i :=1 to jumlahbrg do
begin
writeln;writeln('Barang ke ',i:2);
with barang[i]do
begin
write('Kode barang : ');readln(kode);
write('Nama Barang : ');readln(namabrg);
write('harga satuan : ');readln(hargabrg);
write('jumlah barang: ');readln(jml);
end;
end;
{Menampilkan Hasil}
clrscr;
writeln(' NOTA BELANJA BARANG');
writeln(' TOKO ABADI');
writeln(' Jl. Suka Ngawur No.4 Bangkalan');
writeln;
writeln('Tanggal Pembelian: ',tgl);
writeln('Nama Pembeli : ',nama);
writeln('Alamat : ',alamat);
writeln('------------------------------------------------------------------------------');
writeln('No | Kode barang | Nama Barang | harga satuan(Rp) | jumlah | hargaxjumlah(Rp)');
writeln('------------------------------------------------------------------------------');
totalharga:=0;
for i:= 1 to jumlahbrg do
begin
with barang[i]do
begin
totalharga:=totalharga+(hargabrg*jml);
tot:=hargabrg*jml;
write(i,' ');
write(kode,' ');
write(namabrg:10,' ');
write(hargabrg:10:0,' ');
write(jml,' ');
writeln(tot:10:0);
end;
end;
writeln('------------------------------------------------------------------------------');
writeln(' Total Pembelian : ',totalharga:10:0);
writeln('------------------------------------------------------------------------------');
writeln(' TERIMA KASIH ');
readln;
donewincrt;
end.
Untuk lebih jelasnya lihat Disini
Sob tukeran Link donk?
ReplyDelete@PieBie
ReplyDeleteyuk s0b ..
ne carany gmn sob....
ReplyDeletesya ko' aoleng bcax abis g tau sch
mantap gan.... www.falophi.com
ReplyDelete@KAPAK Comunity
ReplyDeleteKl0' jeLasin lewat tUlisaN suSah s0b. Intinya itu akan menghasilKan output. Nama pembeli, nama brng, harga & jumlah harga total
@Fajar
ReplyDeletethaNk so mUch s0b ..
ajib tratan
ReplyDelete@Kholil Al Qusyairi
ReplyDeletesakalangk0nG tretan ..
berkunjung balik untuk temankuu,.. semangat ngeblog sob...
ReplyDelete@kutulis
ReplyDeleteTerima kasih banyak atas semuanya sob ..