r/code • u/subslash • Apr 27 '22
Help please! brainfuck code
+>+[[>+>+<<-]<[>>>+<<<-]>>>.]
A friend and I like to sebd each other encrypted messages as puzzles. I think this is brainfuck code, but I can't figure out the output.
9
Upvotes
9
u/iamawhale1001 Apr 27 '22
I ran through it on paper , and it appears to output the fibonachi sequence, 2, 3, 5, 8, 13, etc.
It's pretty straitforward to learn how to read it. All you need to know is there's a "tape" that stores numbers, and a pointer that points to a position on the tape.
Theoretically you can do anything any computer can do with these 6 operators , the output operator is just for convenience, but it technically isn't even needed for the language to be turing complete.
Edit: formatting