I have a challenge to write obfuscated code in the brainfuck language to do the following:
For a given number n output its last digit.
input
Input will consist of only one line in which there is only one integer n ( 1 < = n < = 2,000,000,000 ) , followed by a newline ' n' (ASCII 10).
output
On the output, has to find exactly one integer denoting the last digit of n.
example I input: 32 output: 2
example II: input: 231231132 output: 2
This is what I tried, but it didn't work:
+[>,]<.>++++++++++.
See Question&Answers more detail:os