Instead of using for loops (which waste a ton of time) why don't you just add and subtract?



// decimal to ascii
digit += '0';

// acii to decimal
letter -= '0';