Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Replies
    9
    Views
    8,165

    Re: Printing Sum of Primes of a number

    Your debug output should be a bit more verbose. It's hard to tell what the list of numbers you've posted means:
    println("num=" + num + ", start=" + start);

    I have no idea what this means:
    ...
  2. Replies
    9
    Views
    8,165

    Re: Printing Sum of Primes of a number

    Try debugging your code by printing out the results of the tests so you can see what is happening. Add some println()s to the loop in the isPrime() method.
Results 1 to 2 of 2