不知道哪里的问题,而且不知道 a[i] = 0+9-(a[i]-0); 为什么必须要加字符0
使用string.h中的strrev函数。
#include <iostream> #include <cstring> using namespace std; ..... strrev(a);