Code not working right

The ASCII character '0' is represented by the value 48.