#include "stdafx.h"
#include<conio.h>
#include<stdio.h>
#include<stdlib.h>
double fun(int x[])
{ double sum=0.0;
int c=0,i=0;
while(x[i]!=0)
{if(x[i]<0)
{sum=sum+x[i];
c++;
}
i++;
}
sum=sum/c;
return sum;
}
void main()
{int x[1000];
int i=0;
system("CLS");
printf("
data:");
do
{scanf("%d",&x[i]);}
while(x[i++]!=0);
printf("%f ",fun(x));}