#include <stdio.h> main() { float s[10],sum=0,ave,t; int i,j; printf("input 10 data:\n"); for (i=0;i<10;i++) scanf("%f",&s[i]); for (i=0;i<10;i++) sum=sum+s[i]; for (i=0;i<9;i++) for (j=i+1;j<10;j++) if (s[i]<s[j]){t=s[i];s[i]=s[j];s[j]=t;}; for (i=0;i<10;i++) printf("%g ",s[i]); printf("\n"); printf("sum=%g ave=%g\n",sum,sum/10); return 0; }