Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 20th November 2011
Darkc0der Darkc0der is offline
Ceriwiser
 
Join Date: Nov 2011
Posts: 598
Rep Power: 14
Darkc0der mempunyai hidup yang Normal
Default Master pascal... Bantuin pliss

assalamualaikum gan

ane ada sdikit kesulitan dala pascal ne,,

mohon bantuannya ye...


Spoiler for program:






program penjualanpascal;



uses crt;



type



penjualan = record



nb :string[12]; {nb:nama barang,hb:harga barang,jb:jumlah barang, th:total harga}



hb,jb,th:longint;



kode:byte;



end;







var



l : array [1..1000] of penjualan;



x,i,pil, total_harga, diskon, total_bayar,n : longint;







mn: byte;



lagi:char; b:string;



label menu;



begin



clrscr;



menu:



clrscr;



writeln('menu data');



writeln(' 1.input data');



writeln(' 2. data');



writeln(' 3.transaksi');



write('inputkan pilihan :');readln (mn);



case mn of



1:begin



x:=0;



repeat



clrscr;



writeln('========= ==================');



inc(x);



writeln( 'kode barang = A',x);



write('nama barang :');readln (l[x].nb);



write('harga barang :');readln (l[x].hb);



writeln('isi data lagi (y/n) : ') ;readln(lagi);



until(lagi'y')and(lagi'Y');



goto menu;



clrscr;



end;











2:begin



clrscr;



writeln('#======== ===============#');



writeln('|kode| Nama Barang | Harga Satuan |');



writeln('#======== ===============#');



for i:=1 to x do



begin



writeln('| A',l[x].kode,'| ',l[i].nb,' |',l[i].hb,'|' );



end;



writeln;



write('kembali ke menu awal y/n : '); readln (b);



if b = 'y' then



goto menu;



end;















3:begin



repeat



clrscr;



writeln(' ##>========= TOKO MAJu =========

Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


 


All times are GMT +7. The time now is 01:51 AM.


no new posts