Skip to content

Instantly share code, notes, and snippets.

@kimki1124
Created August 6, 2017 12:34
Show Gist options
  • Save kimki1124/a02beae6c1ac539aa41cbd6d6be55aa1 to your computer and use it in GitHub Desktop.
Save kimki1124/a02beae6c1ac539aa41cbd6d6be55aa1 to your computer and use it in GitHub Desktop.
public static int bestPractice(int n) {
return (n != 0 && n%9 == 0) ? 9 : n % 9;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment