编写题解 1045: [编程入门]自定义函数之整数处理 摘要:解题思路:第一:学会调用函数第二:找到最小值和最大值第三:实现题目条件交换注意事项:一定要注意、一定要注意、一定要注意(重要的事情说三遍)1.找到的最大值和最小值千万不要直接交换,注意下边索引,因为直…… 题解列表 2024年05月12日 0 点赞 0 评论 130 浏览 评分:0.0
1017完数的判断(函数以及for循环) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>//判断是否是完数int wanshu(int n){ int sum=0; for(int i=1;i<n;i++) { if(n%…… 题解列表 2024年05月12日 0 点赞 0 评论 231 浏览 评分:0.0
1018 有规律的数列求和(for循环赋初值) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>// 1 2 3 4 5 6 7 //分子 2 3 5 8 13 21 34//分母 1 2…… 题解列表 2024年05月12日 0 点赞 0 评论 137 浏览 评分:0.0
1019 自由落体的距离计算 摘要:解题思路:注意事项:参考代码#include<stdio.h>#include<math.h>//次数 1 2 3 …… 题解列表 2024年05月12日 0 点赞 0 评论 167 浏览 评分:0.0
1020 猴子吃桃问题(逆向思维求解) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>//天数 1 2 3 4 5 //个数 1 4 10 22 46int main(){ int n; scan…… 题解列表 2024年05月12日 0 点赞 0 评论 147 浏览 评分:0.0
1021 求平方根 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>//运用到 sqrt 开平方; int main(){ double n; scanf("%lf",&n…… 题解列表 2024年05月12日 0 点赞 0 评论 119 浏览 评分:0.0
1022筛选N以内的素数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int sushu(int n){ for(int i=2;i*i<=n;i++) { if(n%i==0)//不是素数 { …… 题解列表 2024年05月12日 0 点赞 0 评论 164 浏览 评分:0.0
1023选择排序 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void xuanze(int a[],int n){ int i,j; for(i=1;i<=n-1;i++) { int min=…… 题解列表 2024年05月12日 0 点赞 0 评论 198 浏览 评分:0.0
1024 矩阵对角线求和(二维数组赋初值) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[4][4]; for(int i=1;i<=3;i++) { for(int j=1;j<=3;j…… 题解列表 2024年05月12日 0 点赞 0 评论 108 浏览 评分:0.0
题解 1024: [编程入门]矩阵对角线求和 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N=50;int a…… 题解列表 2024年05月12日 0 点赞 0 评论 196 浏览 评分:0.0