Arithmetic numbers: Difference between revisions
m
→{{header|J}}: Given the definition, negative numbers could be arithmetic numbers, though we're obviously ignoring those for this task
m (→{{header|J}}: include J's prompt (three spaces) for the first line in the examples.) |
m (→{{header|J}}: Given the definition, negative numbers could be arithmetic numbers, though we're obviously ignoring those for this task) |
||
Line 84:
<lang J>factors=: {{ */@>,{(^ [:i.1+])&.>/__ q:y}}
isArith=: {{ (= <.) (+/%#) factors
Task examples:
|