| about | help | done | prefs | create account |
Array-2 > countEvens
prev | next | chance
| Return the number of even ints in the given array. Note: the % "mod" operator computes the remainder, e.g. 5 % 2 is 1.
countEvens({2, 1, 2, 3, 4}) → 3 countEvens({2, 2, 0}) → 3 countEvens({1, 3, 5}) → 0 ...Save, Compile, Run See Also: Example Code Java help: If Boolean Logic | Strings | While and For Loops | Arrays and Loops |
Forget It! -- delete my code for this problem 203.0
Copyright Nick Parlante 2006-09 - privacy