//  Data Structures with Java by John R. Hubbard
//  Copyright McGraw-Hill, 2001
//  Problem 2.26 on page 49
//  Testing a prime factorization method

import schaums.dswj.Primes;
import java.util.Random;

public class Pr0226
{ private static final int N=10;
  private static final int RANGE=2000;
  private static Random random = new Random();

  public static void main(String[] args)
  { for (int i=0; i<N; i++)
    { int n = random.nextInt(RANGE);
      System.out.println(n + " = " + Primes.factor(n));
    }
  }
}  
