Run ID:77010

提交时间:2024-06-08 09:20:44

#include<iostream> #include<cmath> 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; }