Run ID:77018

提交时间:2024-06-08 09:24:21

#include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<iomanip> using namespace std; int main() { int a[10] = {1, 2, 3, 4, 5, 6, 78}; int mxx = 0; int ndd = 10000; for (int i = 0; i <7; i++) { if (a[i] > mxx) { mxx=a[i]; } if (a[i] < ndd) { ndd=a[i]; } }cout<<mxx-ndd; }