Factors of an integer: Difference between revisions
Content added Content deleted
mNo edit summary |
|||
Line 3,301: | Line 3,301: | ||
} |
} |
||
</lang> |
</lang> |
||
=={{header|Ursa}}== |
|||
This program takes an integer from the command line and outputs its factors. |
|||
<lang ursa>decl int n |
|||
set n (int args<1>) |
|||
decl int i |
|||
for (set i 1) (< i (+ (/ n 2) 1)) (inc i) |
|||
if (= (mod n i) 0) |
|||
out i " " console |
|||
end if |
|||
end for |
|||
out n endl console</lang> |
|||
=={{header|Ursala}}== |
=={{header|Ursala}}== |