Answer by
James1290 (86)
In order to do this you must create a for loop cycling through all your numbers. Then within the loop, increment a counter of evens if (num % 2 == 0) and odds otherwise. If you only need numbers within a range, create an if statement first to check if the number is in range before counting.