The code I wrote was meant to take the sum of the digits of an integer number, e.g. 143 gives out 8, 020341 give out 10.
This is the code I wrote for it
I intended for this to print out 11 but it gives me 21 instead. It works fine if the first digit isn't a 0, I'm not sure on how to make it so that it works with 0 in the first digit.
01235
is actually the number 669 (-> 21).020341
is 8417 (-> 20). They are octal literals.