if(n!=0) 什么意思?小白求助
如题!
回复 2楼 不眠的夜
#include<stdio.h>main()
{float score,average=0;
int n=0;
scanf("%f",&score);
while(score>=0)
{average+=score;
n++;
scanf("%f",&score);
}
if(n!=0) average=average/n;
printf("%6.2f",average);
}
大虾这个while和if是怎么执行的?