id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

sspiege3@schools.nyc.gov > countEvens
prev  |  next  |  chance

Complete the given method countEvens to determine the amount of evens between num1 and num2. It is given that num1 < num2


countEvens(2, 4) → 2
countEvens(2, 10) → 5
countEvens(-2, 2) → 3

...Save, Compile, Run (ctrl-enter)

public int countEvens(int num1, int num2){ }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 200

Copyright Nick Parlante 2017 - privacy