0 Members and 3 Guests are viewing this topic.
Oooh, I love BrainFuck Try this one on for size (routine sucks probably >.>)Code: [Select]->[->+>+>+<<<]>>>[-<<<+>>>]<<<<[->>[-<+>]>[->+<<+>]>[-<+>]<<<<]>,Multiplies the first number by the second number, and leaves the result in the... 2nd slot I think... Line breaks were added for readability
->[->+>+>+<<<]>>>[-<<<+>>>]<<<<[->>[-<+>]>[->+<<+>]>[-<+>]<<<<]>,
+++++ +++++ initialize counter (cell #0) to 10[ use loop to set the next four cells to 70/100/30/10 > +++++ ++ add 7 to cell #1 > +++++ +++++ add 10 to cell #2 > +++ add 3 to cell #3 > + add 1 to cell #4 <<<< - decrement counter (cell #0)] > ++ . print 'H'> + . print 'e'+++++ ++ . print 'l'. print 'l'+++ . print 'o'> ++ . print ' '<< +++++ +++++ +++++ . print 'W'> . print 'o'+++ . print 'r'----- - . print 'l'----- --- . print 'd'> + . print '!'> . print '\n'
+++++ +++++ [ > +++++ ++ > +++++ +++++ > +++ > + <<<< - ] > ++ . > + . +++++ ++ . . +++ . > ++ . << +++++ +++++ +++++ . > . +++ . ----- - . ----- --- . > + . > .
+++++ +++++ [ > +++++ ++ > +++++ +++++ > +++ > + <<<< - ] > ++ .> + . +++++ ++ . . +++ . > ++ . << +++++ +++++ +++++ . > . +++ . ----- - . ----- --- . > + . >
Code: [Select]+++++ +++++ [ > +++++ ++ > +++++ +++++ > +++ > + <<<< - ] > ++ .> + . +++++ ++ . . +++ . > ++ . << +++++ +++++ +++++ . > . +++ . ----- - . ----- --- . > + . > If I ever told a programming teacher at a University this was a Hello World program he would not believe it.
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>