//#include "stdafx.h"//In VC++6.0, with this line, please...
#include
using namespace std;
int main(void){
int a[10],i,j,k,max,sum;
cout << "Please input 10 integers...\n";
for(max=1<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;
}
#include
using namespace std;
void main()
{
int a[10];
int i;
int j;
int max=0;
int sum=0;
int average=0;
cout<<"输入10个数"<
{
cin>>a[i];
}
for(i=0;i<10;i++)
{
sum+=a[i];
}
average=sum/10;
max=a[0];
for(i=0;i<9;i++)
{
if(a[i]>a[i+1])
{
max=a[i];
a[i]=a[i+1];
a[i+1]=max;
}
}
cout<<"平均数为:"<