program2.txt

(0 KB) Pobierz
program abc;
var i,j,n,m:Integer;
zm:boolean;
begin
  repeat
  write('m=');
  readln(m);
  write('n=');
  readln(n);
  until ((m<n) and (m>2));
  for i:=m to n do
    if(i mod n<>0) then
    begin
      zm:=true; j:=1;
      repeat
        j:=j+1;
        if (i mod j=0)
        then zm:=false;
      until((j=i-1) or (zm=false));
    if (zm=true)
    then writeln(i);
    end;
  readln;
end.

Zgłoś jeśli naruszono regulamin