program perulangan_repeat;
uses crt;
var
i,batas : integer;
begin
clrscr;
write ('masukkan batas akhir = ');
read (batas);
i := 1;
repeat
writeln (i);
i := i+1 ;
until i > batas;
readln;
readln;
end.
*
program perulangan_while;
uses crt;
var
i,batas : integer;
begin
clrscr;
write ('masukkan batas akhir = ');
read (batas);
i := 1;
while i <= batas do
begin
if (i mod 2 <> 0 ) AND (i mod 3 = 0) then
write (i, ' ');
i := i + 1;
end;
readln;
readln;
end.
beww.www.w.w.. goooodddd kereeennnn
BalasHapusbisa dicoba :)
BalasHapus