Run ID:77384

提交时间:2024-06-09 09:34:15

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