var
i, n, k, j: longint;
begin
i := 1;
write('Введите число: ');
readln(n);
write('Результат: ');
for i := 2 to n do
begin
k := 0;
for j := 2 to round(sqrt(i - 1)) do
if i mod j = 0 then
k := 1;
if (k = 0) and (n mod i = 0) then
write(i, ' ');
end;
end.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.