初学C语言~ 可以帮我看看这个代码问题在哪里吗? 代码提示没有问题但是调试不出来结果
#include<stdio.h>int main(void)
{
int i_even=0,sum_even=0,i_odd=0,sum_odd=0,num;
printf("Please input numbers (0 to quit):");
scanf_s("%d", &num);
while(1)
{
if (num == 0)break;
if(num%2==0)
{i_even++;sum_even+=num;}
else
{i_odd++;sum_odd+=num;}
}
printf("even number' scount:%d\n",i_even);
printf("even number ' saverage:%d\n",sum_even/i_even);
printf("odd number' scount:%d\n",i_odd);
printf("odd number 'saverage:%d\n",sum_odd/i_odd);
return(0);
}