Help:Arrays and JOptionPane
807601Jan 25 2008 — edited Jan 25 2008Factoring of integers. Write a ptogram that asks the user for an integer and the prints out all its factor. For example when the user enters 15 the program should print 1,3,5,15.
The confusion come when asked to use a class FactorGenerator with methods
- int nextFactor()
-boolean hasMoreFactors()
I have done myy best and the dialog box is just saying "ok" Help
import javax.swing.JOptionPane;
public class FactorGenerator
{
public static void main(String[] args)
{
int num;
for (int i = 1 ; i <= 15/2 ; i++)
if(15% i == 0)
{
int[] factors = new int[15];
}
JOptionPane.showMessageDialog(null,"");
}
}