Let's odd code coach problem in C | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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; }

14th Mar 2020, 8:02 PM
高äŗŽéˆž
高äŗŽéˆž - avatar
3 Respostas
+ 10
Read the description again: "The first input denotes the length of the list (N)." You don't have tu add the first number.
14th Mar 2020, 8:18 PM
Kevin ā˜…
+ 4
Kevin Star Thanksļ¼I will see the question clearly next timešŸ˜‚
14th Mar 2020, 8:30 PM
高äŗŽéˆž
高äŗŽéˆž - avatar
+ 3
18th Mar 2020, 12:19 PM
Kevin ā˜