nah kita sekarang membahas membuat program pascal penjualan Untuk Uas he
kita langsung aja membuat program nya
program penjualan;
uses wincrt;
var
nama,jenis,kd,nabar:array[1..10] of string;
harga,jmlbel,diskon:array[1..10] of longint;
jml,disk:array[1..10] of real;
i,j,bayar,kembali,tot:longint;
lg:char;
begin
i:=1;
lg:='Y';
repeat
clrscr;
writeln('==========================');
writeln(' MASUKAN DATA KE ',1,' ');
writeln('==========================');
write('Nama pembeli : '); readln(nama[i]);
write('Jenis (member/ bukan) : '); readln(jenis[i]);
writeln('');
writeln('');
write('Kode barang : '); readln(kd[i]);
write('Nama barang : '); readln(nabar[i]);
write('Harga : '); readln(harga[i]);
write('Jumlah beli : '); readln(jmlbel[i]);
write('Diskon : '); readln(diskon[i]);
disk[i]:=(harga[i]*jmlbel[i])*(diskon[i]/100);
jml[i]:=(harga[i]*jmlbel[i])-disk[i];
writeln('');
i:=i+1;
write('Input data Lagi? (Y/T) : '); readln(lg);
until upcase (lg)<> 'Y';
writeln('');
write('Cetak laporan? (Y/T) : '); readln;
clrscr;
writeln(' LAPORAN DATA TRANSAKSI ');
writeln(' PENJUALAN ');
writeln('=========================================');
writeln('No Nama Barang Harga Jumlah Diskon Sub Total ');
writeln('=====================================’);
for j:=1 to i-1 do
begin
gotoxy(1,J+5);write(j);
gotoxy(6,J+5);write(nabar[j]);
gotoxy(23,J+5);write(harga[j]);
gotoxy(34,J+5);write(jmlbel[j]);
gotoxy(44,J+5);write(diskon[j],'%');
gotoxy(54,J+5);writeln(jml[j]:0:2);
end;
writeln('_______________________________________________’);
writeln('');
writeln('');
{lanjutkan,,,,}
end.
Selesai Juga program pascal penjulan untuk Uas he semoga bermanfaat pembahasan program penjualan
mohon maaf bila ada kekurangan dalam pembahasan kali ini hehehe ‘’’’
0 komentar:
Posting Komentar