//#include "stdafx.h"//In VC++6.0, with this line, please...
#include <iostream>
using namespace std;
int main(void){
int a[10],i,j,k,max,sum;
cout << "Please input 10 integers...\n";
for(max=1<<sizeof(int)*8-1,sum=i=0;i<10;i++){
if(scanf("%d",a+i) && a[i]>max)
max=a[i];
sum+=a[i];
}
cout << "The MAX is " << max << endl;
cout << "The SUM is " << sum << endl;
cout << "The AVERAGE is " << sum/10.0 << endl;
return 0;
}
温馨提示:答案为网友推荐,仅供参考