使用string实现数字分离 摘要:解题思路:使用string拿到用户输入的字符串利用size函数求出字符串大小利用for循环逐个输出用户的字符注意事项:输出每个字符后需要加上空格参考代码:#include<iostream>using…… 题解列表 2024年01月20日 0 点赞 0 评论 337 浏览 评分:0.0
[编程入门]自定义函数之数字分离 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;string s,b;int main(){ cin>>s; for(int …… 题解列表 2022年05月06日 0 点赞 0 评论 158 浏览 评分:0.0
编写题解 1034: [编程入门]自定义函数之数字分离 摘要:解题思路:注意事项:参考代码:#include#includeusing namespace std;void out(string a){ for(int i=0;i<4;i++){ …… 题解列表 2022年03月01日 0 点赞 0 评论 126 浏览 评分:0.0
C++代码 for循环 求余 整除 数组保存每位数值 逆序输出 摘要:解题思路:for循环 求余 整除 数组保存每位数值 逆序输出注意事项:暂时不明参考代码:#include<iostream>using namespace std;int main(){ int…… 题解列表 2021年12月28日 0 点赞 0 评论 452 浏览 评分:0.0
1034-自定义函数之数字分离 语言:C++ 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>using namespace std;void sep(int n){ string s=to_s…… 题解列表 2022年10月05日 0 点赞 0 评论 148 浏览 评分:0.0
自定义函数之数字分离 摘要: #include #include using namespace std; void fun(int i) { int a, b, c, …… 题解列表 2022年10月11日 0 点赞 0 评论 140 浏览 评分:0.0
C语言字符串 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char a[5]; gets(a); for(int i=0;i<3;i++) …… 题解列表 2022年11月06日 0 点赞 0 评论 88 浏览 评分:0.0
c++题解 1034: [编程入门]自定义函数之数字分离 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int check(int a){ int gewei = a%10; int …… 题解列表 2023年03月15日 0 点赞 0 评论 133 浏览 评分:0.0
[编程入门]自定义函数之数字分离-题解(C++代码) 摘要:解题思路:字符串+指针传参 注意事项: 参考代码: ```cpp #include using namespace std; char s[10]; void fun(char …… 题解列表 2021年02月04日 0 点赞 0 评论 161 浏览 评分:0.0
[编程入门]自定义函数之数字分离-题解(C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;void add(string num){ for (int i = 0;i < num.le…… 题解列表 2021年01月25日 0 点赞 0 评论 279 浏览 评分:0.0