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

 

Logic-1 > less20
prev  |  next  |  chance

Return true if the given non-negative number is 1 or 2 less than a multiple of 20. So for example 38 and 39 return true, but 40 returns false. See also: Introduction to Mod


less20(18) → true
less20(19) → true
less20(20) → false

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

public boolean less20(int n) { }

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

Copyright Nick Parlante 2017 - privacy