Rabu, 11 Desember 2013

Program Pascal Menggunakan Procedure

 Program Menggunakan Procedure

1. Listing Program
program harga;
uses wincrt;
procedure pensil;
begin
writeln ('Harga Pensil  : Rp. 2000,-');
end;
procedure buku;
begin
writeln ('Harga buku    : Rp. 2500,-');
end;
procedure penghapus;
begin
writeln ('Harga Penghapus   : Rp. 1000,-');
end;
procedure pulpen;
begin
writeln ('Harga pulpen  : Rp. 1000,-');
end;
var
pilih :byte;
begin
clrscr;
writeln ('Daftar Harga');
writeln ('1. Harga Pensil');
writeln ('2. Harga Buku');
writeln ('3. Harga Penghapus');
writeln ('4. Harga Pulpen');
write ('Masukan nomor pilihan (1-4) :');readln(pilih);
writeln;
case pilih of
1:pensil;
2:buku;
3:penghapus;
4:pulpen;
end;
end.

2. Output


3. Flowchart

1 komentar:

  1. Borgata Hotel Casino & Spa - Mapyro
    Borgata Hotel Casino & Spa. 하남 출장마사지 The only 경상남도 출장안마 place 안산 출장안마 to experience the hospitality of Atlantic City for a taste of Atlantic 여수 출장샵 City's newest attractions and the best 남양주 출장샵

    BalasHapus