program Apotek;
{$APPTYPE CONSOLE}
uses
SysUtils;
var
nmobat,sat,hrg_sat: Array[1..100] of String;
hrgsat,jumobat,jumbyr: Array[1..100] of Real;
tothrg:Real;
X,N:Integer;
lagi:char;
begin
lagi:='Y';
While lagi='Y' Do
begin
Writeln('==========================================');
Writeln('Apotek Indonesia Persada - Dr.Bari Ul Azmi');
Writeln('==========================================');
Writeln;
Write('Jumlah Data Yang di Input? ');Readln(N);
Writeln;
For X:=1 To N do
begin
Writeln('Data Pembelian Obat ke-', X);
Write(' - Nama Obat : ');Readln(nmobat[X]);
Write(' - Satuan : ');Readln(sat[X]);
Write(' - Harga Satuan : ');Readln(hrgsat[X]);
Write(' - Jumlah Obat : ');Readln(jumobat[X]);
Writeln;
end;
Writeln('--------------------------------------------------------------------');
Writeln(':: Data Obat Yang dibeli Konsumen ::');
Writeln('--------------------------------------------------------------------');
Writeln(' No ',' Nama Obat ','Satuan',' Hrg Satuan ','Jum Obat',' Jum Bayar ');
Writeln('--------------------------------------------------------------------');
tothrg:=0;
For X:=1 To N do
begin
jumbyr[X]:=hrgsat[X]*jumobat[X];
tothrg:=tothrg+jumbyr[X];
Writeln(' ',X,' ',nmobat[X],' ',sat[X],' ',hrgsat[X]:4:0,' ',jumobat[X]:4:0,' ',jumbyr[X]:4:0);
end;
Writeln('--------------------------------------------------------------------');
Writeln(' TOTAL = ',tothrg:4:0);
Writeln('--------------------------------------------------------------------');
Writeln;
Writeln;
Write('Tambah Data lagi ? Y / N -->');Readln(lagi);
Writeln;
Writeln;
lagi:=upcase(lagi);
end;
end.
Gambar Tampilan Program Apotek Sederhana
Minggu, 01 Februari 2009
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar