Hello everyone,

I have a homework from a MOOC in which for the function I have to "dissect" the digits of a number to see if it is a palindromic number; so far I don't know of any built-in function that does that so I found a way to do it "manually" and it is actually supposed to work if floor() gives me the correct result.

I took a screenshot to post it (the greyed-out part is for the other forum), and there you can see a reproduction fo the calculations being carried out in the function for the problematic case. Why is this happening? I can't find a reason in the documentation.

What I'm doing here is taking a number—12 in this case—and creating a vector with its digits, but I can't go any further for the other digit because the first one is wrong. The variable names are not descriptive, only for me they are, but I think you can see what I'm trying to do.

Thanks in advance.

## Best Answer