#include<stdio.h>
int main()
{
int a[1000],n,i,z=0,p=0,ng=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<n;i++)
{
if(a[i]==0)
{
z++;
}
else if(a[i]>0)
{
p++;
}
else
{
ng++;
}
}
printf("%f\n",(double)p/(double)n);
printf("%f\n",(double)ng/(double)n);
printf("%f\n",(double)z/(double)n);
return 0;
}
Comments
Post a Comment