int d = n%10 will give you the last decimal digit of your number · char c = '0' + d will do the addition of 48 to it to convert it to the appropriate ASCII code.
確定! 回上一頁