Введенное значение не попадает в цикл - C (СИ)
Формулировка задачи:
Почему значение введенное с клавиатуры не попадает в цикл while?
#include <stdio.h>
int event (int);
main()
{
int number;
scanf("%d",&number);
while(number == 0)
{
printf("%d\n", event(number));
scanf("%d",&number);
}
return 0;
}
int event (int x)
{
if (x%2 == 0)
return 1;
else if (x%2 != 0)
return 0;
}Решение задачи: «Введенное значение не попадает в цикл»
textual
Листинг программы
while(number != 0)