Selamat mencari informasi menarik dari blog saya

Program Input Harga Photo Copy Menggunakan Bahasa Pascal

Posted by Unknown Monday, June 3, 2013 0 comments

 

Yuk! Belajar Konsep Pemrograman Di Mesran.Blogspot.Com 
______________________________________________________

Contoh Program Input Harga Foto Copy

uses crt;

var

Jumlahlembar : longint;

Totharga     : longint;

Pembayaran   : real;

hpl          : byte;

discount     : real;

begin

clrscr;

writeln('PROGRAM INPUT HARGA FOTO COPY');

writeln('-----------------------------------');

write('Jumlah Lembar :');readln(jumlahlembar);

if Jumlahlembar >=200 then hpl:=90 else

if jumlahlembar <=200 then hpl:=100;

writeln('Harga per Lembar:',hpl);

totharga :=hpl*jumlahlembar;

writeln('Total Harga:',totharga);

if totharga > 500000 then discount:=0.15 else

if totharga < 500000 then discount:=0;

discount:=totharga*discount;

writeln('Discount:',Discount:3:0);

pembayaran:= totharga-discount;

writeln('Pembayaran:',Pembayaran:3:0);

readln;

end.

------------------------------------------------------------------------------------
tampilan hasil

 photo pascal1_zps733cafd2.jpg

 photo pascal_zpsfabfc96e.jpg

tampilan hasil ketika mendapatkan discount

 photo pascal2_zps72c23836.jpg

 photo pascal3_zps3f3612c1.jpg

Demikilahlah postingan saya  
Nama : Erixon Andrianus Saruksuk
NPM   :  12110935
Selamat Belajar Bahasa Pemrograman 

Comments
0 Comments

0 comments:

Post a Comment

Online Visitor

bloggersumut.net

Kategori

Blogumulus by Roy Tanck and Amanda Fazani

Statistik Pengunjung

Sahabat Erixon

Site Info



Flag Counter