Binary 提交新资源:
1011字符逆序-c++ - 纯纯分享,自学c++,源码在概述!
阅读关于此资源更多信息...
1011字符逆序-c++ - 纯纯分享,自学c++,源码在概述!
C++:#include<iostream> #include<string.h> #include <string> using namespace std; int main() { char w[100]; cin.getline(w,100);//输入一整行包括空格 //置换 int start = 0; int end = strlen(w)-1; for (int temp;start<=end;) { temp = w[start]; w[start] = w[end]; w[end] = temp; start++; end--; } //输出 int i = 0; for (; i < strlen(w); i++) { cout << w[i]; } return 0; }
阅读关于此资源更多信息...