Sunday, March 6, 2011

lessBy10

public boolean lessBy10(int a, int b, int c) {
  if(a-b>=10 || a-c>=10 || b-a>=10 || b-c>=10 || c-a>=10 || c-b>=10){
  return true;
  }
  return false;
}

6 comments:

  1. i know what that does, i'm so nerdy lol

    ReplyDelete
  2. I have the habit of having everything in an if/while statement whithin many parenthesis. It gets annoying after coding for a while.

    ReplyDelete
  3. great post. looking forward to reading your next one

    ReplyDelete
  4. Taking a programming class soon so I'll know what that means eventually :D

    ReplyDelete
  5. I understand this code, but I have no idea what practical use it has! All the same, it's good to meet another person with a programming blog! Followed!

    ReplyDelete