Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1. `private static void testByFactoring() {
  2.  
  3. {
  4.  
  5.         primes: for (int ctr = 0; ctr < m_toFactor.length; ctr++) {
  6.  
  7.             int toTest = m_toFactor[ctr];
  8.  
  9.             for (int ctr2 = 0; ctr2 < m_divisors.length; ctr2++) {
  10.  
  11.                 // max (int) Math.sqrt(m_numberToTest) + 1 iterations
  12.  
  13.                 if (toTest != m_divisors[ctr2]
  14.                         && toTest % m_divisors[ctr2] == 0) {
  15.                     continue primes;
  16.                 }
  17.  
  18.             } // end of the divisor loop
  19.  
  20.         } // end of primes loop
  21.  
  22.     } // method`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement