Tugas 6 : coding IF sederhana dengan bahas program pascal

Program Harga_Apel_Per_KG;
uses crt;
var KG:string;
begin
clrscr;
write('Input Apel Per KG : ');
readln(KG);
if KG = '1kg' then
begin
writeln('15.000');
end
else if KG = '2kg' then
begin
writeln('18.000');
end
else if KG = '3kg' then
begin
writeln('22.000');
end
else if KG = '4kg' then
begin
writeln('25.000');
end
else;
readln;
end.

Gusti Randy

Previous
Next Post »
Thanks for your comment