
Balladohuginn
4 год назад
На вход программе подается два натуральных числа a и b (a < b). Напишите программу, которая находит все простые числа от a до b включительно.Python
ОТВЕТЫ

Polikarp
Oct 24, 2020
var a, b, i, j, l: integer;
begin
read(a, b);
for i:=a to b do
begin
j:=2;
l:=round(sqrt(i));
while (i mod j <> 0) and (j <= l) do
inc(j);
if j > l then write(i, ' ');
end;
end.
644