0
Sum of negative numbers
Find the sum of the negative elements of an array. {5, 2, -13, 11, 7, 3, 0, -9};
4 odpowiedzi
+ 3
Hints :
Loop through the array
Find value<0
Add them in a variable.
+ 2
Java 8 makes this job easier than ever.
https://code.sololearn.com/cUfcGlNpO6zM/?ref=app
+ 1
Hey Best of Sport , Md Sayed given hint , now can you solve it ?
If you are not able to solve then review your java lessons !
0
You should have to attempt first..
https://code.sololearn.com/cSnfFOtGhvHm/?ref=app