1151: C语言训练-计算一个整数N的阶乘 摘要:```cpp #include using namespace std; int main() { int n,s=1; cin>>n; for(int i=1;…… 题解列表 2022年10月23日 0 点赞 0 评论 326 浏览 评分:7.0
1150: C语言训练-计算t=1+1/2+1/3+...+1/n 摘要:```cpp #include #include using namespace std; int main() { int n; double t=0; ci…… 题解列表 2022年10月23日 0 点赞 0 评论 331 浏览 评分:9.9
1149: C语言训练-计算1~N之间所有奇数之和 摘要:```cpp #include using namespace std; int main() { int n,s=0; cin>>n; for(int i=1;…… 题解列表 2022年10月23日 0 点赞 0 评论 603 浏览 评分:9.9
1148: C语言训练-计算1977!* 摘要:方法一: ```cpp #include #include using namespace std; int main() { int num[100000]; mem…… 题解列表 2022年10月23日 0 点赞 0 评论 361 浏览 评分:9.9
最小绝对值(c++) 摘要:解题思路:法1:用abs()输出绝对值;用sort()排序,排序后最小值是a[0],遍历a[],输出a[i]=a[0]的那个i就是最小值的下标;定义一个数字b[]存原始数据,用来输出,用swap()交…… 题解列表 2022年10月23日 0 点赞 0 评论 381 浏览 评分:9.9
阶乘数列(C++) 摘要:解题思路:注意事项:数字太大int装不下,因此要用科学计数法表示更好,包含<cstdio>后用printf()较方便参考代码:#include<iostream>using namespace std…… 题解列表 2022年10月23日 0 点赞 0 评论 412 浏览 评分:9.9
统计字符(c++) 摘要:解题思路:用if()来分类判断注意事项:注意不同类型的ASCI值参考代码:#include<iostream>using namespace std;int main(){ char a[88]…… 题解列表 2022年10月23日 0 点赞 0 评论 273 浏览 评分:9.9
公约公倍(c++) 摘要:解题思路:最大公约数好求,最小公倍数=乘积/最大公约数注意事项:参考代码:#include<iostream>using namespace std;int main(){ int m,n,i,…… 题解列表 2022年10月23日 0 点赞 0 评论 272 浏览 评分:9.9
计负均正(C++) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include <iomanip> …… 题解列表 2022年10月23日 0 点赞 0 评论 254 浏览 评分:7.3
同因查找(C++) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int i; for(i=10;i<=1000;i++) …… 题解列表 2022年10月23日 0 点赞 0 评论 324 浏览 评分:9.9