文章 2017-11-27 来自:开发者社区

输入一个字符串,将其逆序后输出。(使用C++,不建议用伪码)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 #include <iostream> #include <string> using namespace std;   void SetStr(string &str) {  &nbs...

文章 2010-12-01 来自:开发者社区

输入一个字符串,将其逆序后输出。(使用C++,不建议用伪码)

#include <iostream> #include <string> using namespace std; void SetStr(string &str) { int len=str.length(); char temp; for (int i=0;i<len/2;i++) {//把字符串的两边一一调换 temp=str[i]; ...

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

开发与运维

集结各类场景实战经验,助你开发运维畅行无忧

+关注