- 1
CodingBat Java exercise
Return true if the given non-negative number is 1 or 2 less than multiple of 20. So for example 38 and 39 return true, but 40 returns false. ?
1 Resposta
+ 8
you can use % which return the remaining of dividing a number to 20 and check if it return 18 or 19.