题解 1093: 字符逆序 摘要:参考代码:#include<stdio.h>#include<stdlib.h>int main(){ char str[101]; scanf("%[^\n]",&str); int l; …… 题解列表 2021年03月12日 0 点赞 0 评论 146 浏览 评分:0.0
字符逆序 (C语言代码) 摘要:解题思路:就是字符串函数strlen的应用注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char a[100]; int leng…… 题解列表 2017年10月18日 0 点赞 0 评论 722 浏览 评分:0.0
字符逆序 (Java代码) 摘要:解题思路:注意事项:参考代码:import java.util.*;public class Main { public static void main(String[] args) { …… 题解列表 2018年03月19日 0 点赞 0 评论 561 浏览 评分:0.0
字符逆序 (C语言代码) 摘要:解题思路:可以借用一中间变量temp实现同一数组内就地倒置。注意事项:参考代码:#include <stdio.h>#include<string.h>int main(){ char str[100…… 题解列表 2019年05月25日 3 点赞 0 评论 266 浏览 评分:0.0
字符逆序 (C++代码) 摘要:解题思路:把数组逆序输出注意事项:有空格,用gets()输入cin不识别控制符参考代码:#include<iostream>#include<string.h>#include<cstdio>usin…… 题解列表 2019年01月19日 0 点赞 0 评论 354 浏览 评分:0.0
花落的新手代码(C语言代码) 摘要:解题思路:输入字符串,交换相应位置的字符。注意事项:参考代码:#include<stdio.h>#include<string.h>#define AUM(x,y) {int t;t=x;x=y;y=…… 题解列表 2017年12月17日 1 点赞 0 评论 765 浏览 评分:0.0
字符逆序 使用StringBuilder 4行解决此类问题(Java代码) 摘要:解题思路:使用java自带的StringBuilder类的reverse()方法即可获得翻转后的字符注意事项:无参考代码: import java.util.Scanner; public c…… 题解列表 2018年05月13日 1 点赞 1 评论 756 浏览 评分:0.0
字符逆序------------- 摘要:解题思路:使用切片参考代码:s=input() s=s[::-1] print(s)…… 题解列表 2022年01月08日 0 点赞 0 评论 192 浏览 评分:0.0
字符逆序 (C语言代码) 摘要:解题思路以及注意事项:先让用户输入字符串,记得要用gets()接收,方便。然后用strlen()函数计算用户输入了几个字符,strlen()函数在string.h里面。最后用for循环输出,注意数组的…… 题解列表 2017年06月17日 1 点赞 0 评论 875 浏览 评分:0.0
字符逆序 (C语言代码) 摘要:解题思路:通过获取字符串,然后从字符串的后方进行倒退输出注意事项:代码中的fgets()函数在输入字符串的时候会保存换行符,所以执行的时候会出现格式错误,这里可以用gets()函数替代,但是gets(…… 题解列表 2018年11月15日 0 点赞 0 评论 340 浏览 评分:0.0