A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
11
Task/Executable-library/J/executable-library-1.j
Normal file
11
Task/Executable-library/J/executable-library-1.j
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
hailseq=: -:`(1 3&p.)@.(2&|) ^:(1 ~: ]) ^:a:"0
|
||||
9!:29]1
|
||||
9!:27'main 0'
|
||||
main=:3 :0
|
||||
smoutput 'Hailstone sequence for the number 27'
|
||||
smoutput hailseq 27
|
||||
smoutput ''
|
||||
smoutput 'Finding number with longest hailstone sequence which is'
|
||||
smoutput 'less than 100000 (and finding that sequence length):'
|
||||
smoutput (I.@(= >./),>./) #@hailseq i.1e5
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue