c++ 边乘边加 摘要:#include<iostream> using namespace std; int a[1000],b[1000]; void cheng(int a[],int c) { int j…… 题解列表 2023年11月30日 0 点赞 0 评论 637 浏览 评分:6.0
2846: 统计数字字符个数 摘要:解题思路:这道题涉及了字符串,我们就需要头文件<string.h>,按照题目要求,输入字符会包含空格,所以我们输入不再使用scanf,而是使用gets()。注意事项:在遍历数组中的字符串是,我们要明白…… 题解列表 2023年11月30日 0 点赞 0 评论 961 浏览 评分:6.0
Yu:1022筛选N以内的素数 **解题思路:**用a作标记,遍历2~n这些数。a=1表示i为素数,a=0表示非素数。默认a=1,如果发现可以被某个数整除,则可判断为非素数。标记a=0,并退出循环。**参考答案**```c++#includeusingnamespacestd;intmain(){intn, 题解列表 2023年12月01日 1 点赞 0 评论 538 浏览 评分:6.0
答案之中的答案 摘要:解题思路:wu注意事项:wu参考代码:#include<iostream>using namespace std;int main(){ int a,b,c; cin>>a>>b>>c; …… 题解列表 2023年12月02日 0 点赞 0 评论 594 浏览 评分:6.0
题解 1038: [编程入门]宏定义练习之三角形面积 摘要:解题思路:套两个公式。。。注意事项:不要抄袭,会遭报应的。参考代码:#inalude <bits..tdc++.h>usisg namespdce stb;doable a,b,c,s,j,y;int…… 题解列表 2023年12月03日 0 点赞 0 评论 636 浏览 评分:6.0
公式and代码 摘要:解题思路:a1+(n-1)*d a2-a1=d注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ …… 题解列表 2023年12月03日 0 点赞 0 评论 392 浏览 评分:6.0
1806: [编程基础]输入输出练习之第二个数字 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int a,b,c;int main(){ cin>>a>>b>>c; …… 题解列表 2023年12月05日 0 点赞 0 评论 639 浏览 评分:6.0
题解 2905: 最大值和最小值的差 #includeusingnamespacestd;inta[100000],b[100000],c[1000000],d,e,f,g;intmain(){cin>>d;for(inti=0;i>a[i];}e=a[0];f=a[0];for(inti=0;ie){e=a[i];}}for(inti= 题解列表 2023年12月06日 0 点赞 2 评论 399 浏览 评分:6.0
LJX........................................................ 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n,a,sum=1; cin>>a>>n; …… 题解列表 2023年12月06日 0 点赞 0 评论 383 浏览 评分:6.0