1009: [编程入门]数字的处理与判断 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int num = 0; cin >> num; s…… 题解列表 2024年01月23日 0 点赞 0 评论 604 浏览 评分: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 评论 320 浏览 评分:9.9
数字的处理与判断 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n ,count = 0 ,i = 0 , a[5]…… 题解列表 2024年01月17日 0 点赞 0 评论 224 浏览 评分:9.9
利用递归求解数字的处理与判断 摘要:解题思路:首先须知,在c++中:1、当一个整数/10时,不会产生小数。即int/int != float。例如:123/10=12,而不是12.32、当一个整数%10时,产生的数是该数的末位。即:12…… 题解列表 2024年01月17日 0 点赞 0 评论 340 浏览 评分:9.9
正确的递归应该是啥样的?。。。 摘要:参考代码:#include<iostream> using namespace std; void print1(int a); void print2(int a); int main(…… 题解列表 2024年01月01日 0 点赞 0 评论 547 浏览 评分:9.9
递归函数法 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>int b[5],i=0,mask2=1,n=0;int fun(int a ,int w){ if…… 题解列表 2023年12月21日 0 点赞 0 评论 272 浏览 评分:0.0
C++利用指针重复遍历输出 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string.h>using namespace std;int main(){ char str[20] =…… 题解列表 2023年12月21日 0 点赞 0 评论 285 浏览 评分:0.0
【基础】思维数字的处理与判断 摘要:解题思路:按照题目给的限制不超过5位数进行解答可以使用if-else if进行解答先给定范围判断为几位数,得出结论后进行单个数字拆解,最后做一个逆序输出即可按照小白入门解法代码较多且比较磨人注意事项:…… 题解列表 2023年12月13日 0 点赞 0 评论 506 浏览 评分:10.0
[编程入门]数字的处理与判断 摘要:a = input()print(len(a))b = list(a)for i in b: print(i,end=' ')print()print(a[::-1])…… 题解列表 2023年11月23日 0 点赞 0 评论 392 浏览 评分:0.0
初学者用if暴力解法 摘要:解题思路:定义一个变量a,其中:if条件a/10000!=0表示a为一个五位数,以此类推注意事项:注意else if 的用法,不要丢了else 第二个问题不要用else参考代码:#include <s…… 题解列表 2023年11月22日 0 点赞 0 评论 353 浏览 评分:0.0