Run ID:77391

提交时间:2024-06-09 09:37:41

#include<iostream> #include<iomanip> using namespace std; int main(){ int a[1000] = {}; for(int i=0;i<=9;i++){ cin>>a[i]; } int mxx = 0,ndd =1000; for(int i=0;i<=9;i++){ if(ndd > a[i]){ ndd = a[i]; } if(mxx < a[i]){ mxx = a[i]; } } cout<<" "<<mxx-ndd<<endl; }