关于读取空格:cin,cin.get,getline,cin.getline及计算长度:sizeof,strlen,length,size 摘要:解题思路:用字符串数组录入数据再反向输出即可注意事项:使用strlen时需包含头文件#include<bits/stdc++.h>,否则网页编译器报错cin:常用于c++中读取数据,但遇到空格和回车即…… 题解列表 2024年03月08日 0 点赞 0 评论 160 浏览 评分:0.0
C语言题解 1093: 字符逆序 摘要:#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <string.h> int main() { char str[…… 题解列表 2024年02月22日 0 点赞 0 评论 81 浏览 评分:0.0
代码的尽头是优雅 摘要:解题思路:Java的库函数yyds注意事项:要用nextline要读取空格参考代码:import java.util.Scanner;public class Main { public sta…… 题解列表 2023年11月17日 0 点赞 0 评论 110 浏览 评分:0.0
真就搞不懂了,一堆有问题的题 摘要:##我是真搞不懂,为什么错了 ###解题思路: 直接将字符串gets进定义好的字符数组中 计算出字符串长度 定义同样大小的另外一个输出字符数组并将输入的字符串逆序放进输出字符数组中 …… 题解列表 2023年09月06日 0 点赞 0 评论 193 浏览 评分:0.0
一种思路简单的字符逆序 摘要:解题思路:主要利用python自带的方法节省思考时间,首先input接收字符串,转换类型为列表,然后reverse()方法逆序,利用join方法转换回字符串。注意事项:注意牢记方法的使用参考代码:st…… 题解列表 2023年08月03日 0 点赞 0 评论 174 浏览 评分:9.9
暴力for循环(字符逆序) 摘要:#include<iostream>#include<string>using namespace std;int main(void){ string s; getline(cin,s)…… 题解列表 2023年07月25日 0 点赞 0 评论 98 浏览 评分:9.9
****************************************************************************字符逆序******************** 摘要:解题思路:注意事项:参考代码:// 题目 1093: 字符逆序#include <bits/stdc++.h>#include <bits/stdc++.h> using namespace std;…… 题解列表 2023年07月18日 0 点赞 0 评论 103 浏览 评分:0.0
fgets解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main() { char str[100]; int i; fg…… 题解列表 2023年07月03日 0 点赞 0 评论 93 浏览 评分:9.9
利用指针修改相应的地址实现字符逆序 摘要:#include <stdio.h>#include <string.h>void interchange(char *i,char *j);int main(){ char str[100];…… 题解列表 2023年05月17日 0 点赞 0 评论 88 浏览 评分:0.0
1093: 字符逆序 摘要:#1093: 字符逆序 ```c++ #以下仅为我个人思路,请多多指教! #include using namespace std; int main(){ char a[100]; …… 题解列表 2023年05月02日 0 点赞 0 评论 145 浏览 评分:0.0