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

 

sspiege3@schools.nyc.gov loopaccum > oddOrEven
prev  |  next  |  chance

oddOrEven:: Given an integer, return if the number is even or odd. Example-- for 3 it would return the statement: 3 is odd


oddOrEven(2) → "2 is even"
oddOrEven(5) → "5 is odd"
oddOrEven(27) → "27 is odd"

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

public String oddOrEven(int x){ }

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: 101 Post-solution available

Copyright Nick Parlante 2017 - privacy