publicstaticvoidde_quality_factor() { Scannerscanner=newScanner(System.in); intN= scanner.nextInt(); intn= N; if (n < 1) return; System.out.print(n + "="); for (inti=2; i * i < n; i++) { while (n % i == 0) { System.out.print(i); n = n / i; if (n != 1) System.out.print("*"); }
} if (n != 1 && n != N) System.out.print(n); elseif (n == N) System.out.println("1*" + n); }