[编程入门]自定义函数之字符串反转 摘要:解题思路:#include<stdio.h>#include<string.h>int main(){ char a[15]={'0'}; scanf("%s", &a);…… 题解列表 2023年03月01日 0 点赞 0 评论 92 浏览 评分:0.0
字符串去除空格并反转 摘要:def f(): s = input() s =s.replace(" ","") #去除空格 print(s[::-1]) #反转f()…… 题解列表 2023年02月24日 0 点赞 0 评论 141 浏览 评分:0.0
031: [编程入门]自定义函数之字符串反转 摘要:```cpp #include #include #include using namespace std; // 写一函数,使输入的一个字符串按反序存放, // 在主函数中输入并输出反序…… 题解列表 2023年02月23日 0 点赞 1 评论 190 浏览 评分:9.9
自定义函数之字符串反转(除了hellow word 外简单的代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char str[100]; gets(str); int n = strl…… 题解列表 2023年02月09日 0 点赞 0 评论 136 浏览 评分:9.9
c语言解决字符串反转 摘要:解题思路:注意事项:字符串后面有一个'\0’所以要从j-1开始遍历,跳过\0参考代码:#include <stdio.h>#include <stdlib.h>#include <string…… 题解列表 2023年01月07日 0 点赞 0 评论 279 浏览 评分:0.0
1031: [编程入门]自定义函数之字符串反转 【c++】 摘要:解题思路:用string 类型来解决 并用下标访问 循环逆序打出字符串注意事项: 为了方便没有定义一个函数 就写了主函数参考代码:#include<iostream>#include<string>u…… 题解列表 2023年01月05日 0 点赞 0 评论 564 浏览 评分:9.9
自定义函数之字符串反转(C语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>void fun(char str[]){ char* str1 = str; char* str2…… 题解列表 2023年01月04日 0 点赞 0 评论 130 浏览 评分:9.9
[编程入门]自定义函数之字符串反转-题解(c语言) 摘要:解题思路:定义两个char类型数组,a和b,把b输入在a的数组里面,在输出a数组参考代码:#include <stdio.h> #include <string.h> void cmp(char …… 题解列表 2022年12月28日 0 点赞 0 评论 95 浏览 评分:9.9
自定义函数之字符串反转(malloc) 摘要:参考代码如下(反着输出就可以) #include #include #include int main(void) { char* p=N…… 题解列表 2022年12月27日 0 点赞 0 评论 195 浏览 评分:9.9
字符串反转简单代码 摘要:解题思路:注意事项:特别注意:在for循环中,i的初始值应为len-1否则不会出来运行结果。参考代码:#include<stdio.h>#include<string.h>int main(){ …… 题解列表 2022年12月26日 0 点赞 0 评论 120 浏览 评分:0.0