为什么N输出的总是0
#include<stdio.h>void main()
{float score,average=0;
int n=0;
do
{scanf("%f",&score);
if (score>=0)
{average+=score;
n++;
}
}while (score>=0);
if (n!=0)average/=n;
printf("%6.2f\n",average);
printf("%6.2f",n);
}
printf("%6.2f",n);
我想看看一共输入的是N是多少结果输出的是0 为什么?