/*234Press any key to continue*/#includeint main() {int i,num = 234,n;char ch,s[10];for(n = 0; num; ++n) {s[n] = num % 10 + '0';num /= 10;}s[n] = '\0';for(i = 0; i < n / 2; ++i) {ch = s[i];s[i] = s[n - 1 - i];s[n - 1 - i] = ch;}puts(s);return 0;}
本文共 314 字,大约阅读时间需要 1 分钟。
/*234Press any key to continue*/#includeint main() {int i,num = 234,n;char ch,s[10];for(n = 0; num; ++n) {s[n] = num % 10 + '0';num /= 10;}s[n] = '\0';for(i = 0; i < n / 2; ++i) {ch = s[i];s[i] = s[n - 1 - i];s[n - 1 - i] = ch;}puts(s);return 0;}
转载于:https://www.cnblogs.com/yihujiu/p/5550697.html