program ex_1;
var x, i: Integer;
begin
write('Введите x: ');
read(x);
for i := 1 to trunc(sqrt(x)) do
if ((x mod i) = 0) then
write(i,' ');
for i := trunc(sqrt(x)) downto 1 do
if (i=trunc(sqrt(x))) and (i*i=x) then
else
write((x/i):0:0, ' ');
end.
program ex_1;
var x, i: Integer;
begin
write('Введите x: ');
read(x);
for i := 1 to trunc(sqrt(x)) do
if ((x mod i) = 0) then
write(i,' ');
for i := trunc(sqrt(x)) downto 1 do
if (i=trunc(sqrt(x))) and (i*i=x) then
else
if ((x mod i) = 0) then
write((x/i):0:0, ' ');
end.