# calculate the factors of a positive integer number

• 03-17-2014, 02:46 AM
ATB
calculate the factors of a positive integer number
lines 7, 8, &12 "primes" are underline in red (prime cannot be resolved) is what pops up when i hover over the x's.
i don't get why that is.
Code:

```package assignment7;   public class Exercise3 {         public static void main(String[] args)         {                 Prime.setSize(1000);                 for (int p = Primes.next(); p < 30; p = Primes.next())                 {                         int n = (int)Math.round(Math.pow(2,p)) - 1;                         System.out.printf("%d\t2^%d-1%d", p, p, n);                 if (Primes.isPrime(n))                 {                         System.out.println(" is prime ");                 } else                 {                         System.out.println(" is not prime ");                 }                 }         } }```
• 03-17-2014, 02:50 AM
jim829
Re: calculate the factors of a positive integer number
What is Prime vs Primes? Perhaps you are missing an import statement. And in the future, please place your code
between [code][/code] tags.

Regards,
Jim
• 03-17-2014, 02:51 AM
jashburn
Re: calculate the factors of a positive integer number