IMPORTANT: LOAD IN TURBO MODE (SHIFT+CLICK on the green flag) This is a program that interprets the computer programming language "BrainF__K". It is a programming language that understands only 8 instructions. It works by having a large list of numbers, and a marker keeping track of where in the list the user is. The commands are: + : adds 1 to the current spot - : subtracts 1 form the current spot > : moves one spot down < : moves one spot up , : gets input from the user and sets the current spot to it . : outputs the current spot into the output array [ ] : loops whatever is in the brackets as long as the current spot (at the '[' or ']') is not 0.
Some programs to try: Basic: ,+++. Inputs a number, adds 3, and outputs it +++++[-] adds 5 and then clears the spot Intermediate: ,>, [-<+>] <. inputs 2 numbers, adds them, and outputs the result ,[->+++<]>. inputs a number, multiplies it by three, and outputs the result Hard: ,>,<[>[>+>+<<-]>>[<<+>>-]<<<-]>>. inputs two numbers, multiplies them, and outputs the result ,>,>+<[->[-<<[->>>+>+<<<<]>>>>[-<<<<+>>>>]<<]>[-<+>]<<]>. inputs two numbers, computes a to the power of b, and outputs the result ,>,<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>[-]>[-<+>]>[-<<<+>>>]<<<. inputs two numbers, computes a/b, and outputs the result EXPERT: ,>+++++++++>++<[->[->+>+<<]>[-<+>]<<<[->>>+>>+<<<<<]>>>>>[-<<<<<+>>>>>]<<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>[-]>[-<+>]>[-<<<+>>>]<<<[-<+>]++>[-]<<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>[-]>[-<+>]>[-<<<+>>>]<<[-]<<]>[-<+>]<. inputs a number, calculates the squareroot of that number, and outputs it (works for really big numbers!! Try 15129. Warning: it takes a few minutes to complete) >,[-<+>>,+[->>+>>+<<[->+<]<[->+<]<[->+<]>>>>[-<<<<+>>>>]<<<]>>[-<<<[->>>>+<<<<]>[-<+>]>[-<+>]>[-<+>]<]<<<]>>>>>[>[-<<+<+>>>]<<<[->>>+<<<]>[->-[-<<+<+>>>]<<<[->>>+<<<]+>[<->[-]]<[>>[-]<<[-]]>>]>[-<+>]<[-<<<.>>>]<<<+>>[->+<]<[->+<]<[->+<]>>>>[-<<<<+>>>>]>] SORTING ALGORITHM: First, you input the amount of numbers you will type, then input that many number, and the program will output them sorted (warning, memory size must be at least 10 larger than the highest value)