I need to write a program that produces a random integer between 1 and 200.

Then that number needs to be listed along with all of its prime factors.

I think I'm good with the creating of the random number. The other part of the code I think just says if the number is prime or not. I need to try to change it so it produces the prime factors. Can anyone help me write this?

public Driver()

{

// initialise instance variables

int p = (int)(Math.random()*200+1);

System.out.println(p);

}

public boolean isPrime(int p) {

int divisor;

boolean looksPrime;

looksPrime = true;

divisor = 2;

while (divisor <= Math.sqrt(p)) {

if (p/divisor == (double)p/divisor) {

looksPrime = false;

}

divisor++;

}

return looksPrime;

}