Square-free integers: Difference between revisions

→‎{{header|J}}: arrayify the counting tasks
(→‎{{header|J}}: list all results and correct indent)
(→‎{{header|J}}: arrayify the counting tasks)
Line 684:
countSqrFree 1 thru 1000
608
1 countSqrFree@thru&> 10 ^ 2 3 4 5 6 NB. count square free ints for 1 to each of 100, 1000, 10000, 10000, 100000 and 1000000
countSqrFree 1 thru 10000
61 608 6083 60794 607926</lang>
6083
countSqrFree 1 thru 100000
60794
countSqrFree 1 thru 1000000
607926</lang>
 
=={{header|Java}}==
892

edits