多种方法,不使用数组也行 摘要:有多种解法,可以先排序,然后直接首尾相减 ```c #include #include int cmp(const void *a,const void *b){ return …… 题解列表 2024年11月05日 0 点赞 0 评论 332 浏览 评分:0.0
用VS来写最大值和最小值之差 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int M; scanf_s("%d", &M); int number[10000]; int i = 0;…… 题解列表 2024年08月07日 0 点赞 0 评论 427 浏览 评分:0.0
2905: 最大值和最小值的差 摘要:``` #include using namespace std; const int N=10010; int a[N],n,b,e,h; int main() { cin>>n; …… 题解列表 2023年12月26日 0 点赞 0 评论 413 浏览 评分:6.0
题解 2905: 最大值和最小值的差 摘要: #include using namespace std; int a[100000],b[100000],c[1000000],d,e,f,g; int mai…… 题解列表 2023年12月06日 0 点赞 2 评论 288 浏览 评分:6.0
最大值和最小值的差 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int max,min,i,M,a[10000]; scanf("%d",&M); for(i=0;i<M;i+…… 题解列表 2022年11月22日 0 点赞 0 评论 569 浏览 评分:7.0
编写题解 2905: 最大值和最小值的差 摘要:```c #include int main() { int num,nums[10000],i,j,temp; scanf("%d",&num); for(i=0;i…… 题解列表 2024年05月27日 0 点赞 0 评论 339 浏览 评分:9.9
2905: 最大值和最小值的差(max_element) 摘要:解题思路:一个最简单的思路,把输入的数扫描一遍,找到最大值和最小值,相减即可。需要注意将两个变量初始化。参考代码:#include<iostream> #include<set> using na…… 题解列表 2022年09月14日 1 点赞 0 评论 1158 浏览 评分:9.9
c语言数组求差 摘要:解题思路:利用数组求解,通过if判断条件得出max和min注意事项:记得遍历数组参考代码:#include <stdio.h>int main(){ int n; scanf("%d",&…… 题解列表 2023年12月06日 0 点赞 0 评论 430 浏览 评分:9.9
2905: 最大值和最小值的差 摘要:```#include using namespace std; int N[1000000],n,b; int main(){ cin>>n; for( int i=1;i>N[i];…… 题解列表 2023年12月01日 0 点赞 0 评论 342 浏览 评分:9.9
最大值和最小值的差(java) 摘要:解题思路:注意事项:参考代码:package Fourteen;import java.util.Scanner;public class 最大值和最小值的差 { public static v…… 题解列表 2023年05月11日 0 点赞 0 评论 606 浏览 评分:9.9