I\'m trying to write a program with BrainFuck that can read two numbers up to 9, calculate the sum of them and then print the result out, e.g. 3 & 5 give the result 8 .
I've created a solution that can add ANY NUMBER OF NUMBERS with ANY NUMBER OF DIGITS:
,[+>,]>++++++++[<<[------<]>[>]>-]<<[++++[----[<]<+[<+<+>>-]<<[>>+<<
-]>[<<<[<<]+[>>]>-]>>>>[>]<-[[<]<<<<<[<<]>>>+>[>>]>>>>[>]<-]<[<]<<<<<[<<]>>[[-]>
>]>>>>[>]>+<]>-[<<[<]<[-]>>[>]>+]<<]<[-]<->>>>>->+[[-]>+>[<]<]<->>+>->+[>>+]<<[+
[--[>+>+<<-]>>[<<+>>-]>+<<[>++++++++++<[->-[>>]<<<]>>>>[<<<----------<<+>>>>]<]>
>[-]<<<[[-]<[-]<<[->>>>>+<<<<<]]<]<]>>>>>>>>>>[<<]>>[+[->++++++++[<++++++>-]<.[-
]]>>]
For example:
input: 13611+85399+35943
output: 134953
Make sure "Memory overflow behavior" is set to wrap.