- 2
Using arrays in loops (exercise - help)
I need help with this exercise, I did it this way but I know that there is something that is not right, but I do not know what it is. The program you are given takes 5 numbers as input and stores them in a matrix. Complete the program to go through the matrix and generate the sum of the even numbers. Input example 10 890 fifteen 3699 14 Output example 914 Track An integer is even if it is divisible by two, so the number n is even if n% 2 equals 0. This is my code: https://code.sololearn.com/cYgmq64j5yvG/?ref=app
4 ответов
+ 1
i< count;
par = par + numbers[i];
+ 1
deleting your previous question wich got answers and reposting it is unfair ^^
+ 1
Simba Thank you very much for helping me, I already changed the suggested values and it worked for me. I am learning more that way and the hints or suggestions have made me understand the logic better. Thanks
0
Simba answer doesn't help to make your input example to work ^^