+ 1
Code coach [That's odd]
Task 4 and 5 failed!! Can anyone tell me what's wrong with my code ? https://code.sololearn.com/cCSOpek3TC55/?ref=app
7 Respuestas
+ 6
#include <iostream>
using namespace std;
int main() {
int x;
int n;
int sum=0;
for(int i=0;i<=n;i++)
{
cin>>x;
if(x%2==0)
sum=sum+x;
}
cout<<sum;
return 0;
}
Friend I hope this will help u with u r code to solve problem
+ 3
The Crazy Programmer you need to give a hint
Becoz practice makes man better
+ 1
Samir_Shah Right. But The Crazy Programmer has give you a hint, not the ready solution.
+ 1
0
But input should be a list of numbers
And we need to find the sum of even numbers
0
Thanks 😊
0
Can we work with arrays