Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
82
Task/Hailstone-sequence/Brainf---/hailstone-sequence.bf
Normal file
82
Task/Hailstone-sequence/Brainf---/hailstone-sequence.bf
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
>>>>>>,>,>,<<
|
||||
|
||||
[
|
||||
.[-<+>]
|
||||
]
|
||||
>
|
||||
[
|
||||
.[-<+>]
|
||||
]
|
||||
>
|
||||
[
|
||||
.[-<+>]
|
||||
]
|
||||
<<<<
|
||||
|
||||
|
||||
>------------------------------------------------[<<+>>-]>
|
||||
[
|
||||
<<<
|
||||
[<+>-]<
|
||||
[>++++++++++<-]>
|
||||
>>>
|
||||
------------------------------------------------
|
||||
[<<<+>>>-]>
|
||||
[
|
||||
<<<<
|
||||
[<+>-]<
|
||||
[>++++++++++<-]>
|
||||
>>>>
|
||||
------------------------------------------------
|
||||
[<<<<+>>>>-]
|
||||
]
|
||||
<
|
||||
|
||||
<<<[>+<<<+>>-]>[-<+>]>>>>>>>>>++++[>+++++++++++<-]++++[>>++++++++<<-]<<<<<<<<<<
|
||||
|
||||
[
|
||||
>>>>>>>>>>+>.>.<<<<<<<<<<<<
|
||||
>>+>+<<<
|
||||
[-[->]<]+
|
||||
>>>[>]
|
||||
<[-<]<[-]<
|
||||
|
||||
[>+>+<<-]>[<+>-]+
|
||||
>[
|
||||
<<<[->>>>+>+>+<<<<<<]>>>>>>
|
||||
[-<<<<<<+>>>>>>]<[-<<<<<+>>>>>]<[-<<<<+>>>>]
|
||||
<<<<+>>
|
||||
-
|
||||
>[-]]
|
||||
<<[-]>[
|
||||
<<[-<+>[-<->>>>>+>]<<<<<]>>>>[-<<<<+>>>>]<<
|
||||
-]
|
||||
|
||||
<<[->+>+<<]>[-<+>]>
|
||||
|
||||
[>>+>+<<<-]>>>[<<<+>>>-]<<+>[<->[>++++++++++<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>[-]
|
||||
++++++++[<++++++>-]>[<<+>>-]>[<<+>>-]<<]>]<[->>++++++++[<++++++>-]]<[.[-]<]<
|
||||
|
||||
-[+>]<
|
||||
]
|
||||
|
||||
[This program never terminates! ]
|
||||
[This program isn't complete, (it only prints the hailstone ]
|
||||
[sequence of a number until 1) but it may help other people ]
|
||||
[to make complete versions. ]
|
||||
[ ]
|
||||
[This program only takes in up to 3 digit numbers as input ]
|
||||
[If you want to input 1 digit integers, add a 0 before. e.g ]
|
||||
[04. ]
|
||||
[ ]
|
||||
[Summary: ]
|
||||
[This program takes 16 memory cells of space. Their data is ]
|
||||
[presented below: ]
|
||||
[ ]
|
||||
[Cell 0: Temp cell. ]
|
||||
[Cell 1: Displays the current number. This changes based on ]
|
||||
[Collatz' Conjecture. ]
|
||||
[Cell 14: Displays length of the hailstone sequence. ]
|
||||
[Cell 15: ASCII code for ",". ]
|
||||
[Cell 16: ASCII code for " " (Space). ]
|
||||
[Rest of the cells: Temp cells. ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue