Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program lcl;
- var
- i, m, n, j: integer;
- a: array[1..100] of integer;
- begin
- readln(n);
- i := 2;
- m := 1;
- repeat
- if (n mod i) = 0 then
- begin;
- n := n div i;
- a[m] := i;
- m := m + 1;
- end
- else
- i := i + 1;
- until n = 1;
- for j := 1 to m do
- begin;
- writeln(a[j]);
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement