Program penentuan ;
var a : integer;
b : real ;
c : char ;
begin
repeat
writeln ('program ganjil genap');
writeln ('---------------------');
writeln;
write ('masukkan bilangan sembarang = ') ; readln (a);
b := a mod 2 ;
writeln ;
if b = 0 then
begin
write ('bilangan genap');
end ;
if b = 1 then
begin
write ('bilangan ganjil') ;
end ;
writeln;
writeln;
write ('mau coba lagi [Y/T] : '); readln (c) ;
until (c) = 'T' ;
readln;
readln;
end .
Jumat, 19 November 2010
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar