So for my assignment, I have to write a program that asks the user for an integer input and then print out that number\'s prime factorization. This is what I have:
remove the if (count == 0) {continue;} statement from the while loop and put it after it, in the for loop. :)
for (int i = 2; i<=(number); i++) { count = 0; while (number % i == 0) { number /= i; count++; } if(count==0) continue; System.out.println(i+ "**" + count); }