Arithmetic numbers: Difference between revisions
Content added Content deleted
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: | Line 84: | ||
<lang J>factors=: {{ */@>,{(^ [:i.1+])&.>/__ q:y}} |
<lang J>factors=: {{ */@>,{(^ [:i.1+])&.>/__ q:y}} |
||
isArith=: {{ (= <.) (+/%#) factors |
isArith=: {{ (= <.) (+/%#) factors|y}}"0</lang> |
||
Task examples: |
Task examples: |