Program Ganjil Genap

program ganjil_genap;

uses wincrt;

var
   a, b : integer;

begin
     write('Masukan nilai : ');
     readln(a);
     b := a mod 2 ;
     writeln();

     if b = 1 then
        begin
        write('Nilai ',a,' adalah bilangan Ganjil');
        end

     else
        begin
        write('Nilai ',a,' adalah bilangan Genap');
        end;

readkey();

end.

0 comments:

Post a Comment

 
Copyright © . My Live Is Tutorial - Posts · Comments
Theme Template by BTDesigner · Powered by Blogger