hoy.. mas bro.. ni aku posting lagi.. karena dari pada nglamun aja di mess mending tengok lagi blog aja... sapa tau ada manfaatnya bagi orang lain.. amin..
berikut aplikasi kasirnya copas aja mas...
berikut aplikasi kasirnya copas aja mas...
Program Kasir;
uses crt;
var nama_barang:array[1..20] of string;
harga:array[1..20] of real;
banyak:array[1..20] of byte;
kata,grs:string;
x,y,i,j:byte;
jum_harga,total_harga,disc,total_bayar,uang:real;
begin
clrscr;
grs:='==========================================================================';
kata:='Program Kasir';
x:=round((78-length(kata))/2);
gotoxy(x,2);writeln(kata);
x:=round((78-length(grs))/2);
gotoxy(x,3);write(grs);
{-----------------------------}
gotoxy(x,4);writeln('SAMSUL Fashion AND Art');
gotoxy(x,5);write(grs);
gotoxy(x,6);writeln(' I No I Nama Barang I Harga Satuan IBanyak I Jumlah Harga ');
gotoxy(x,7);write(grs);
{--------------------------------------------------------------------------------------------------------}
i:=0;
total_harga:=0;
repeat
i:=i+1;
gotoxy(x,7+i);write(' I ',i);
gotoxy(x+5,7+i);write(' I ');
gotoxy(x+7,7+i);readln(nama_barang[i]);
if nama_barang[i] <>'' then
begin
gotoxy(x+25,7+i);write('I');
gotoxy(x+28,7+i);readln(harga[i]);
gotoxy(x+28,7+i);writeln(harga[i]:10:0);
gotoxy(x+41,7+i);write('I');
gotoxy(x+44,7+i);readln(banyak[i]);
gotoxy(x+50,7+i);write('I');
jum_harga:=harga[i]*banyak[i];
gotoxy(x+53,7+i);writeln(jum_harga:10:0);
gotoxy(x+56,7+i);writeln('');
total_harga:=total_harga+jum_harga;end;
until nama_barang[i]='';
{---------------------------------------------------------------------------}
disc:=0;
if(total_harga>10000) and (total_harga<100000 then=""> disc:=0.05*total_harga
else
if (total_harga>=100000) then
disc:=0.1*total_harga;
{---------------------------------------------------------------------------}
kata:='Struk Penjualan';
y:=round((78-length(kata))/2);
gotoxy(y,2);writeln(kata);
j:=i-1;
gotoxy(x,8+j);write(grs);
gotoxy(x,8+j+1);write('Total Belanja : ');
gotoxy(x+53,8+j+1);write(total_harga:10:0);
gotoxy(x,8+j+2);write('Discount 10% : ');
gotoxy(x+53,8+j+2);write(disc:10:0);
gotoxy(x,8+j+3);write(grs);
gotoxy(x,8+j+4);write('Total Bayar : ');
total_bayar:=total_harga-disc;
gotoxy(x+53,8+j+4);write(total_bayar:10:0);
gotoxy(x,8+j+5);writeln('Uang diBayar');
gotoxy(x+53,8+j+5);readln(uang);
gotoxy(x+53,8+j+5);writeln(uang:10:0);
gotoxy(x,8+j+6);write(grs);
gotoxy(x,8+j+7);write('Uang Kembali');
gotoxy(x+53,8+j+7);write(uang-total_bayar:10:0);
readln;
end.100000>
uses crt;
var nama_barang:array[1..20] of string;
harga:array[1..20] of real;
banyak:array[1..20] of byte;
kata,grs:string;
x,y,i,j:byte;
jum_harga,total_harga,disc,total_bayar,uang:real;
begin
clrscr;
grs:='==========================================================================';
kata:='Program Kasir';
x:=round((78-length(kata))/2);
gotoxy(x,2);writeln(kata);
x:=round((78-length(grs))/2);
gotoxy(x,3);write(grs);
{-----------------------------}
gotoxy(x,4);writeln('SAMSUL Fashion AND Art');
gotoxy(x,5);write(grs);
gotoxy(x,6);writeln(' I No I Nama Barang I Harga Satuan IBanyak I Jumlah Harga ');
gotoxy(x,7);write(grs);
{--------------------------------------------------------------------------------------------------------}
i:=0;
total_harga:=0;
repeat
i:=i+1;
gotoxy(x,7+i);write(' I ',i);
gotoxy(x+5,7+i);write(' I ');
gotoxy(x+7,7+i);readln(nama_barang[i]);
if nama_barang[i] <>'' then
begin
gotoxy(x+25,7+i);write('I');
gotoxy(x+28,7+i);readln(harga[i]);
gotoxy(x+28,7+i);writeln(harga[i]:10:0);
gotoxy(x+41,7+i);write('I');
gotoxy(x+44,7+i);readln(banyak[i]);
gotoxy(x+50,7+i);write('I');
jum_harga:=harga[i]*banyak[i];
gotoxy(x+53,7+i);writeln(jum_harga:10:0);
gotoxy(x+56,7+i);writeln('');
total_harga:=total_harga+jum_harga;end;
until nama_barang[i]='';
{---------------------------------------------------------------------------}
disc:=0;
if(total_harga>10000) and (total_harga<100000 then=""> disc:=0.05*total_harga
else
if (total_harga>=100000) then
disc:=0.1*total_harga;
{---------------------------------------------------------------------------}
kata:='Struk Penjualan';
y:=round((78-length(kata))/2);
gotoxy(y,2);writeln(kata);
j:=i-1;
gotoxy(x,8+j);write(grs);
gotoxy(x,8+j+1);write('Total Belanja : ');
gotoxy(x+53,8+j+1);write(total_harga:10:0);
gotoxy(x,8+j+2);write('Discount 10% : ');
gotoxy(x+53,8+j+2);write(disc:10:0);
gotoxy(x,8+j+3);write(grs);
gotoxy(x,8+j+4);write('Total Bayar : ');
total_bayar:=total_harga-disc;
gotoxy(x+53,8+j+4);write(total_bayar:10:0);
gotoxy(x,8+j+5);writeln('Uang diBayar');
gotoxy(x+53,8+j+5);readln(uang);
gotoxy(x+53,8+j+5);writeln(uang:10:0);
gotoxy(x,8+j+6);write(grs);
gotoxy(x,8+j+7);write('Uang Kembali');
gotoxy(x+53,8+j+7);write(uang-total_bayar:10:0);
readln;
end.100000>
0 comments:
Post a Comment