if looping in parsing string data

Thank you

I have try my code and when I press 3, the program print xxx, so the problem is not in the

if (result== '3'){

I have tried with serial monitor, I input 3 then showed xxx in the monitor
and I input 6 data say 060120 and the monitor did not respond