Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
The community reviewed whether to reopen this question 2 years ago and left it closed:
Original close reason(s) were not resolved
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
我相信 Wiki 文章中有一些 BrainFuck 代码的简单示例。 Brainfuck
至于斐波那契,这里有一个页面,其中包含一些代码(请注意,不是我的)生成斐波那契数列最多为一百。 Brainfuck,斐波那契数列
请注意,经典的 Brainfuck 解释器使用 < em>byte 变量来存储内存单元。因此,如果您想要阶乘,它不会比 5 更进一步!
尽管如此,我还是为你找到了一个例子。 Brainfuck,阶乘
额外阅读:Brainfuck 中的简单但不那么简单的程序
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