RSS

Selasa, 25 September 2012

Program pascal Cek Bilangan Genap atau Ganjil


PROGRAM cek_bilangan_ganjil_genap;
 uses crt;
 var 
bil : integer;
ulang : boolean; 
balik : char;

begin
 clrscr;
 ulang := true;
 while ulang Do
 begin
 clrscr; 
 textcolor(green);
 gotoxy (1,2);
 writeln('Program Cek Bilangan Genap dan Ganjil');
 writeln('====================================');
 write('Masukkan bilangan :');
 readln(bil);
 
 
 if bil mod 2 = 0
 then
 begin
 writeln('Bilangan ',(bil),' adalah genap');
 end;
 if bil mod 2 <> 0
 then
 begin
 writeln('Bilangan ',(bil),' adalah ganjil');
 end;
  
 write('Mau coba lagi (Y/N) : ');
 readln(balik);
 if (balik ='n') or (balik='N') then ulang := False;
 end;
end.

0 komentar:

Posting Komentar

free counters

about me :)

SEMARAPURA, Klungkung, Indonesia
 
Copyright 21ARt 2009. Powered by Blogger.Wordpress Theme by Ezwpthemes .
Converted To Blogger Template by Anshul Dudeja.