+ 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 Antworten
+ 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.