Tuesday, June 12, 2012

Pascal Bilangan Ganjil

,
uses crt;
var a, i : integer;
begin
     clrscr;
     write ('Rizka Fajriah');
     writeln;
     write ('masukkan angka : ');readln(a);
     writeln;
     writeln('angka ganjil');
     for i := 1 to a do
     begin
     if ( i mod 2 = 1) then
     write (i,' ');
     end;
     readln;
end.

Output :


0 comments to “ Pascal Bilangan Ganjil ”

Post a Comment