Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Source for simple programs in Brainfuck? [closed]

Is there a source where I can get multiple simple programs like addition, factorial, fibonacci and others for the brainfuck programming language?

I know that there has been a question posted before here : https://stackoverflow.com/questions/3554670/tutorials-for-brainfuck

But I would like to have a list of simple programs, short bite-sized programs to get comfortable with the language. Any help is welcome. Thanks.

like image 364
Arjun J Rao Avatar asked Feb 14 '11 18:02

Arjun J Rao


1 Answers

I believe the Wiki article had some simple examples of BrainFuck code. Brainfuck

As for Fibonacci, here's a page with some code (not mine, mind you) generating the Fibonacci sequence up to one hundred. Brainfuck, Fibonacci sequence

Do note that the classic Brainfuck interpreter uses byte variables to store memory cells. So if you'd like a factorial, it wouldn't get you much further than 5!. Nonetheless, I've found an example for you. Brainfuck, Factorial

Extra reading: Simple, and not so simple programs in Brainfuck

like image 136
Aeveus Avatar answered Oct 13 '22 13:10

Aeveus