+ 3
Let's odd code coach problem in C
My code failed in case 4 and 5. What's the problem in my code? Please help #include <stdio.h> int main() { int a,b=0; while(scanf("%d",&a)!=EOF){ if(a%2==0){ b+=a; } }printf("%d",b); return 0; }
3 RĂ©ponses
+ 10
Read the description again:
"The first input denotes the length of the list (N)."
You don't have tu add the first number.
+ 4
Kevin Star ThanksïŒI will see the question clearly next timeđ
+ 3
Marcin WiĆniewsk Don't spam.