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

 

jebbert@volusia.k12.fl.us > quiz2021_10_21_APSLHL_evenOrOdd
prev  |  next  |  chance

Write a method that returns a string stating if the input parameter is even or odd. As a precondition, you may assume that 'num' is positive. Look at the test data for examples.


quiz2021_10_21_APSLHL_evenOrOdd(238) → "238 is even"
quiz2021_10_21_APSLHL_evenOrOdd(8121) → "8121 is odd"
quiz2021_10_21_APSLHL_evenOrOdd(823) → "823 is odd"

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

public String quiz2021_10_21_APSLHL_evenOrOdd(int num) { }

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: 220

Copyright Nick Parlante 2017 - privacy