C++ Integer Real Type Conversion
You need to add 48 to the first one, because x% 10 is a single digit, such as 1, and the ANSCI code of the character' 1' is 49, so you need to add 48,2. There may be something wrong with the second question, x = 10 * C65438+.