Jump to content

Japani

Trade With Caution
  • Posts

    12
  • Joined

  • Last visited

  • Feedback

    0%

About Japani

Profile Information

  • Gender
    Female

Japani's Achievements

Newbie

Newbie (1/10)

4

Reputation

  1. Nothing you should've wrote yourself??????????
  2. public static boolean isPrime(long n) { //from wikipedia if (n <= 3) { return n > 1; } else if (n % 2 == 0 || n % 3 == 0) { return false; } else { double sqrtN = Math.floor(Math.sqrt(n)); for (int i = 5; i <= sqrtN; i += 6) { if (n % i == 0 || n % (i + 2) == 0) { return false; } } return true; } } looks like you just changed the brackets?
×
×
  • Create New...