1137-求函数值(代码短,思路容易理解) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int fun(int n){ if(n==1) return 10; …… 题解列表 2022年10月08日 0 点赞 0 评论 195 浏览 评分:0.0
1136-求具有abcd=(ab+cd)2性质的四位数(代码短,思路容易理解) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int c; for(int i=1000;i<100…… 题解列表 2022年10月08日 0 点赞 0 评论 192 浏览 评分:0.0
sort排序解决选择排序 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a[15]; for(int i=0;i…… 题解列表 2022年10月08日 0 点赞 0 评论 157 浏览 评分:0.0
1135-求s=a+aa+aaa+aaaa+aa...a的值(代码短,思路容易理解) 摘要:解题思路:注意事项:参考代码:/*将a,aa,aaa,...看作一个数列,该数列的特点:从数列的第二项开始,每一项与它的前一项的关系为:*10+a。 */#include<iostream>using…… 题解列表 2022年10月08日 0 点赞 0 评论 301 浏览 评分:0.0
1140-求车速(reverse()函数) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>#include<algorithm>using namespace std;int main(){…… 题解列表 2022年10月08日 0 点赞 0 评论 241 浏览 评分:0.0
1140-C语言训练-求车速 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>using namespace std;int main(){ int m=95860; while…… 题解列表 2022年10月08日 0 点赞 0 评论 215 浏览 评分:0.0
1133-求1+2!+3!+...+N!的和 摘要:解题思路:注意事项:参考代码:/*1)20的阶乘:243 2902 0081 7664 0000 (19位) 超出了int类型的最大范围,所有阶乘的结果用long long型变量存储。 2)long …… 题解列表 2022年10月08日 0 点赞 0 评论 208 浏览 评分:0.0
1134-C语言训练-求PI 摘要:解题思路:注意事项:参考代码:/*pi的计算公式:pi/4=1-1/3+1/5-1/7+...1) 控制每一项的正负:方法一: k=1;k*=-1;方法二: k=0;pow(-1,k); 2) 控制每…… 题解列表 2022年10月08日 0 点赞 0 评论 410 浏览 评分:0.0
1015: [编程入门]求和训练(do while) 摘要:解题思路:3个循环,直接加注意事项:1.注意 while( ) 和 do while( ) 的区别2.注意 i-- 和 --i 的区别参考代码:#include <iostream> #includ…… 题解列表 2022年10月08日 0 点赞 0 评论 236 浏览 评分:9.9
1059: 二级C语言-等差数列 摘要:解题思路:注意事项:参考代码:#include <iostream> using namespace std; int main() { int n = 0, s = 0; …… 题解列表 2022年10月08日 0 点赞 0 评论 164 浏览 评分:0.0