1009: [编程入门]数字的处理与判断 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int num = 0; cin >> num; s…… 题解列表 2024年01月23日 0 点赞 0 评论 347 浏览 评分:0.0
此题运用了stl中的vector容器 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ vector<int>v1; int num; cin>>n…… 题解列表 2024年01月20日 0 点赞 0 评论 146 浏览 评分:9.9
利用递归求解数字的处理与判断 摘要:解题思路:首先须知,在c++中:1、当一个整数/10时,不会产生小数。即int/int != float。例如:123/10=12,而不是12.32、当一个整数%10时,产生的数是该数的末位。即:12…… 题解列表 2024年01月17日 0 点赞 0 评论 155 浏览 评分:9.9
正确的递归应该是啥样的?。。。 摘要:参考代码:#include<iostream> using namespace std; void print1(int a); void print2(int a); int main(…… 题解列表 2024年01月01日 0 点赞 0 评论 331 浏览 评分:9.9
C++利用指针重复遍历输出 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string.h>using namespace std;int main(){ char str[20] =…… 题解列表 2023年12月21日 0 点赞 0 评论 112 浏览 评分:0.0
字符串解法 摘要:解题思路:如果要求每一位的数字,常规思路应该是整除,这个只是有点复杂并不难,本来想用一个数组的,后来觉得数组也有点麻烦,就直接用了字符串(其实是相似的道理)注意事项:字符串要使用string进行定义参…… 题解列表 2023年09月30日 0 点赞 0 评论 242 浏览 评分:9.9
编写题解 1009: [编程入门]数字的处理与判断 摘要:解题思路:利用strlen函数求出数组有效大小,即数字位数。再利用swich选择语句根据不同位数来进行输出注意事项:注意加上头文件#include<string.h>#include<iostream…… 题解列表 2023年09月09日 0 点赞 0 评论 243 浏览 评分:9.9
题解 1009: [编程入门]数字的处理与判断 摘要:解题思路:获取数字位数(int ws(int) 实现)获取每一位的数字(int *part(int) 实现)按要求输出(主函数实现)注意事项:A.floor()向下舍入,至于作用,自行实验!B.注意题…… 题解列表 2023年06月22日 0 点赞 0 评论 411 浏览 评分:9.9
[编程入门]数字的处理与判断 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<cmath>int main(){ int num = 0; int tem…… 题解列表 2023年06月18日 0 点赞 0 评论 85 浏览 评分:0.0
非常基础的解决方法 摘要:解题思路:用了一些取巧的办法,比较无脑,刚学习c++哈注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a; cin…… 题解列表 2023年04月16日 0 点赞 0 评论 154 浏览 评分:9.0