RosettaCodeData/Task/Arithmetic-numbers/APL/arithmetic-numbers.apl

16 lines
443 B
APL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

task{
facs 0=|
aritm (0=|+/)facs
comp 2<(facs)
aritms aritm¨15000
'First 100 arithmetic numbers:'
10 10aritms
{
''
'The ',(),'th arithmetic number: ',(aritms[])
ncomps +/comp¨aritms
'Of the first ',(),' arithmetic numbers, ',(ncomps),' are composite.'
}¨10*3 4
}