Program Lupingan

program pascal;
uses wincrt;
var i:longint;
hasil : integer;

begin
i:=1;
repeat
write(i,' ');
i:=i+1;
until i>500;

end.



program pascal;
uses wincrt;
var b:longint;
hasil : integer;

begin
writeln('bilangan = '); readln(b);
if (b mod 2)=1 then
write('ganjil')
else
write('genap');

end.



program konversi_biner;
uses wincrt;
var desimal,d,sisa,biner:integer;

begin
write('Angka Desimal = ');readln(desimal);
d:=0;
repeat
sisa:=desimal mod 2;
desimal:=desimal div 2;
if (d=0) then
d:=1
else
d:=d*10;
biner:=biner+sisa*d;
until desimal=0;
write('biner =',biner);

end.


program pelajar;
uses wincrt;
var
  i,a:integer;
begin
     a:=16;
     for i:=6 downto 1 do
begin
     write(a,' ');
     a:=a-3 ;
end;
end.




program belajar;
uses wincrt;
var
i:integer;
begin
i:=1;
while i<=16 do
begin
write(i,' ');
i:=i+3;
end;
end.


program pelajar;
uses wincrt;
var
 i:integer;
begin
     i:=0;
     repeat
     i:=i+2;
     write(i,' ');
     until i=10;
end.