Factors of an integer: Difference between revisions
Content added Content deleted
(→{{header|PureBasic}}: Added PureBasic) |
|||
Line 701: | Line 701: | ||
=={{header|Ursala}}== |
=={{header|Ursala}}== |
||
Filter the sequence of numbers from 1 to n according to divisibility into n. |
Filter the sequence of numbers from 1 to n according to divisibility into n. |
||
<lang Ursala> |
<lang Ursala>#import std |
||
#import std |
|||
#import nat |
#import nat |
||
factors "n" = (not remainder/"n")*~ |
factors "n" = (not remainder/"n")*~ nrange(1,"n")</lang> |
||
</lang> |
|||
test program: |
test program: |
||
<lang Ursala> |
<lang Ursala>#cast %nL |
||
#cast %nL |
|||
example = factors 100 |
example = factors 100</lang> |
||
</lang> |
|||
output: |
output: |
||
⚫ | |||
<pre> |
|||
⚫ | |||
</pre> |