int i = a - '0'; printf("%d",i);. The char values for digits 0 to 9 are contiguous and you make use of that here as shown above.
確定! 回上一頁