Pages

Diberdayakan oleh Blogger.
Banner4 Hosting Indonesia

Selasa, 28 Oktober 2014

Contoh Program Stock Handphone pada Pascal

Kali ini saya akan membagikan source code untuk membuat program stock handphone pada Pascal.
Berikut ini source codenya :

program hape;
uses crt;
type stock=record
        nape,jenis,tipe:string;
        jml,hrg:longint;
     end;
var tanya:char;
    i,j:byte;
    fd:array[1..50] of stock;
procedure input;
 begin

  i:=1;
 repeat
 clrscr;
  gotoxy(20,1);write('=================================================');
  gotoxy(20,2);write('=== PROGRAM TAMBAH STOCK HANDPHONE PONSEL FSD ===');
  gotoxy(20,3);write('=================================================');
  gotoxy(10,5);write('Inputkan data ke-',i);
  gotoxy(10,7);write('Nama Handphone            : ');readln(fd[i].nape);
  gotoxy(10,9);write('Tipe                      : ');readln(fd[i].tipe);
  gotoxy(10,11);write('Jenis (Slide/Touch/Biasa) : ');readln(fd[i].jenis);
  gotoxy(10,13);write('Harga Satuan              : Rp. ');readln(fd[i].hrg);
  gotoxy(10,15);write('Jumlah Masuk              : ');readln(fd[i].jml);
  gotoxy(10,20);write('Apakah anda ingin input data lagi <Y/N> ? ');readln(tanya);
  inc(i);
  tanya:=upcase(tanya);
 until tanya='N';
 end;
 procedure tampil;
 begin
  gotoxy(15,1);writeln('======================================================');
  gotoxy(15,2);writeln('||              STOCK BARANG PONSEL FSD             ||');
  gotoxy(15,3);writeln('======================================================');
  gotoxy(12,6);writeln('--------------------------------------------------------------');
  gotoxy(12,7);writeln('| No | Nama Handphone | Tipe | Jenis | Harga/Satuan | Jumlah |');
  gotoxy(12,8);writeln('--------------------------------------------------------------');
  for j:=1 to i-1 do
  begin
   gotoxy(12,j+8);writeln('|');
   gotoxy(14,j+8);writeln(j,'.');
   gotoxy(17,j+8);writeln('|');
   gotoxy(19,j+8);writeln(fd[j].nape);
   gotoxy(34,j+8);writeln('|');
   gotoxy(36,j+8);writeln(fd[j].tipe);
   gotoxy(41,j+8);writeln('|');
   gotoxy(43,j+8);writeln(fd[j].jenis);
   gotoxy(49,j+8);writeln('|');
   gotoxy(52,j+8);writeln('Rp. ',fd[j].hrg);
   gotoxy(64,j+8);writeln('|');
   gotoxy(68,j+8);writeln(fd[j].jml);
   gotoxy(73,j+8);writeln('|');
  end;
  gotoxy(12,j+9);writeln('--------------------------------------------------------------');
  gotoxy(51,j+10);writeln('created by : J1F113038');
  end;
begin
 clrscr; input;
 clrscr; tampil;
readln;
end.

Sekian dari saya, semoga artikel ini bermanfaat.
Terima Kasih.

Untuk download programnya, silahkan download (DISINI)

0 komentar:

Posting Komentar

Hosting Indonesia