while((scanf("%d", &num)) == 1)
{
while( num != 0)
{
if(num % 2 == 0)
{
e_num += num;
i++;
}
else
{
o_num += num;
j++;
}
}
printf("The numbers of odd number are:%d, average of odd numbers is:%f\n", j, (float)o_num / j);
printf("The numbers of odd number are:%d, average of odd numbers is:%f\n", i, (float)e_num / i);
printf("Please enter another numbers(0 to quit):\n");
}
请问我这段代码哪里出了问题吗?完整代码和运行结果如下图,麻烦帮忙指出问题所在
!