用Dev-C++使Hello Word变成droW olleH
#include
using namespace std;
int main() { string str = "Hello World"; string reversedStr = "";
for (int i = str.length() - 1; i >= 0; i--)
{
reversedStr += str[i];
}
cout << reversedStr << endl;
return 0;
}
原文地址: https://www.cveoy.top/t/topic/hg4R 著作权归作者所有。请勿转载和采集!