SHARE
TWEET

Untitled

a guest Jun 16th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public boolean nearTen(int num) {
  2.   return modulo10(num) || modulo10(num - 1) || modulo10(num + 1) || modulo10(num - 2) || modulo10(num + 2);
  3. }
  4.  
  5. private boolean modulo10(int num) {
  6.   return num % 10 == 0;
  7. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top