1126:C语言训练-字符串正反连接题解 解题思路:此题是字符串中比较简单的一题了。我们用一个循环输入字符串,再用一个循环倒序输出一下。则循环参数从字符串的长度-1开始,到0结束,因为字符串的下标从0开始。然后每次循环参数-1,每次输出字符串中的一个字符。注意事项:任意字符串,就说明中间会出现空格, 题解列表 2022年03月29日 0 点赞 0 评论 545 浏览 评分:0.0
用指针完成颠倒位置 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void DD(char *a){ char *p = a; char temp; while(*a != '\0') …… 题解列表 2018年03月17日 0 点赞 0 评论 1347 浏览 评分:0.0
1206: 字符串问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { char str[50]; gets(str); int len=strlen(str); fo…… 题解列表 2022年06月23日 0 点赞 0 评论 524 浏览 评分:0.0
字符串翻转秒解决 摘要:#include #include #include using namespace std; //回文串 int main() { string s1; cin>>s1;…… 题解列表 2022年10月22日 0 点赞 0 评论 531 浏览 评分:0.0
编写题解 1206: 字符串问题(最短) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ string a;//定义 cin>>a;//输出 …… 题解列表 2022年11月04日 0 点赞 0 评论 575 浏览 评分:0.0
编写题解 1206: 字符串问题 摘要:##编写题解 1206: 字符串问题 ```cpp #include using namespace std; int main() { string s; cin>>s; fo…… 题解列表 2023年02月04日 0 点赞 0 评论 536 浏览 评分:0.0
字符串问题——抽象JAVA 解题思路:StringBuilder反转参考代码:importjava.util.*;publicclassMain{publicstaticvoidmain(String[]args){Scannerscanner=newScanner(System.in);Stringstring=scanner 题解列表 2023年04月06日 0 点赞 0 评论 844 浏览 评分:0.0
C++ string类:字符串问题 #C++string类```c++#includeusingnamespacestd;intmain(){strings;getline(cin,s);for(inti=s.size()-1;i>=0;i--){cout 题解列表 2023年06月05日 0 点赞 0 评论 918 浏览 评分:0.0
菜鸡写法,分情况就ok 摘要:解题思路:注意事项:参考代码:#include <iostream>#include<string>#include<cstring>#include<algorithm>#include<cmath…… 题解列表 2023年12月24日 0 点赞 0 评论 642 浏览 评分:0.0
编写题解 1206: 字符串问题 解题思路:我们的目标是将输入字符串中的字符位置进行颠倒,也就是让原本在首位的字符挪到末尾,原本在末尾的字符挪到首位,依次类推注意事项:字符位置颠倒操作确定交换范围:利用循环来实现字符的两两交换从而达到颠倒的目的。循环条件设为i 题解列表 2024年12月12日 0 点赞 0 评论 787 浏览 评分:0.0 « 123456 »