Ads

Friday, January 11, 2013

Implementasi Algoritma : Nomor Keberuntungan



Iseng - iseng nih postingin tugas kampus. ^_^

uses wincrt;
label
mulai,keluar;
var
 a : integer;
 jawab:char;
begin
mulai:
clrscr;
gotoxy (20,10); writeln('********NOMOR KEBERUNTUNGAN********');
gotoxy (20,11); writeln('-----------------------------------');
gotoxy (20,12); writeln (‘Pilih Nomor Dari 1 Sampai 9!!!');
gotoxy (22,13); readln (a);
gotoxy (20,14); if (a=7) then writeln ('SELAMAT ANDA MENDAPATKAN SMART PHONE')
 else writeln ('MAAF ANDA KURANG BERUNTUNG');
    begin
    gotoxy (20,15); writeln('--------------------------');
    gotoxy (20,16); writeln('Terima Tasih Telah Mencoba');
    end;
gotoxy (20,19); writeln('------------------------');
gotoxy (20,20); writeln('mau mencoba lagi [y/t],?');readln(jawab);
    gotoxy (20,21); if(jawab='y') then goto mulai;
    gotoxy (20,22); if(jawab='t') then goto keluar;
keluar:   
end.

0 komentar:

Post a Comment