| #include <iostream.h>void obrabotka_vivod(int [ ], int);
 int main()
 {
 int const n=10;
 int a[n];
 for(int i=0;i<10;i++)
 {
 cin>>a[i];
 }
 obrabotka_vivod(a,n);
 return 0;
 }
 
 void obrabotka_vivod(int b[], int m)
 {
 int t=0;
 int s=0;
 float sredne;
 for(int j=0;j<m;j++)
 {
 if(b[j]<0)
 {
 t++;
 s+=b[j];
 }
 }
 sredne=s/t;
 cout<<sredne;
 }
 
 |