Program Hitung_Pajak;
uses crt;
var kls_brg : byte;
nm_brg : string[20];
hrg_brg : longint;
pjk, hasil : real;
procedure input;
begin
writeln;
writeln(' ***_MENGHITUNG PAJAK PENDAPATAN PENJUALAN_*** ');
writeln('$===============================================$');
write(' Masukkan Kelas Barang : ');readln(kls_brg);
write(' Masukkan Harga Barang : Rp. ');readln(hrg_brg);
end;
procedure hitung;
begin
if kls_brg = 1 then
begin
nm_brg :='Makanan';
pjk :=0.05;
end
else if kls_brg = 2 then
begin
nm_brg :='Pakaian';
pjk :=0.1;
end
else if kls_brg = 3 then
begin
nm_brg :='Mesin-mesin';
pjk :=0.2;
end;
hasil := pjk * hrg_brg;
end;
procedure cetak;
begin
writeln;
writeln('$===============================================$');
writeln(' Besar Pajak = Rp. ',hasil:0:0);
writeln(' Nama Barang = ',nm_brg);
writeln;
writeln(' Terima Kasih . . . ! ! ! ');
end;
begin
clrscr;
input;
hitung;
cetak;
writeln(' charles demon');
readln;
end.
Tidak ada komentar:
Posting Komentar