Skip to content

Penggunaan If pada Turbo Pascal

April 27, 2009

Program Toserba;
uses crt;
var
pelanggan : char;
dis : string[3];
tot,blnja : real;
begin
clrscr;
writeln(‘ Dedix Toserba’);
writeln(‘=================================’);
write(‘Berbelanja sebesar = ‘); readln(blnja);
write(‘Pelanggan (y/t) ? : ‘); readln(pelanggan);
if pelanggan=’y’ then
begin
if blnja<=100.000 then
begin
tot := blnja -(10/100*blnja);
dis :=’20%’;
end
else

Download source lengkapnya di sini

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: