Jumat, 09 Januari 2015

Latihan 7: Program Memasukan Harga

uses wincrt;
var
 harga:integer;
begin
 write('Masukkan Harga = ');readln(harga);
case harga of
 1:writeln('SATU');
 2:writeln('DUA');
 3:writeln('TIGA');
 4:writeln('EMPAT');
 5:writeln('LIMA');
 6:writeln('ENAM');
 7:writeln('TUJUH');
 8:writeln('DELAPAN');
 9:writeln('SEMBILAN');
 0:writeln('NOL');
else
writeln('BILANGAN SELAIN 0 s/d 9');
end;
end.

Tidak ada komentar:

Posting Komentar