2024-11-29 21:51:03
#include<
#define N 10
void main() { int a[N],i,max,min,a3,a5,a7; float av;
for ( i=0;i<N;i++ ) scanf("%d",&a[i]);
max=min=a[0]; for ( i=1;i<N;i++ ) if ( max<a[i] ) max=a[i]; else if ( min>a[i] ) min=a[i];
a3=a5=a7=0; av=0;
for ( i=0;i<N;i++ ) {
av+=a[i]; if ( a[i]%3==0 ) a3++; if ( a[i]%5==0 ) a5++; if ( a[i]%7==0 ) a7++;
}
for ( i=0;i<N;i++ ) printf("%d ",a[i]); printf("\n");
av/=N; printf("%d %d %f\n",max,min,av); printf("%d %d %d\n",a3,a5,a7);
}
2024-11-29 09:47:28
刚刚没打全