Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Forming function operation
Forming function operation
Intfun (int a [], int b [], int count)//count is the number of elements of array a.

{

int avg,sum = 0; //avg stores the average value;

int CNT = 0; //Store the number of elements in the B array;

for(int I = 0; I < count; i++)

sum+= a[I];

Avg = sum/count;

for(I = 0; I < count; i++)

if(a[I]& gt; Average value)

b[cnt++]= a[I];

Return cnt

}