As I say to every one requesting programming help on these forums. If you don't specify a language, then it just means you'll have to translate the answer that is given to you, to a different language. Here's what you want in Java:
<span>import java.util.InputMismatchException<span>; </span>import java.util.Scanner<span>; </span> public class Test { public static void main(String[] args) { int number = numInput()<span>; </span> printFactors(Math.abs(number))<span>; </span> }
private static int numInput() { Scanner sc = new Scanner(System.in)<span>; </span> System.out.print("Enter number: ")<span>; </span> int input<span>; </span> while (true) { try { input = sc.nextInt()<span>; </span><span> break; </span> } catch (InputMismatchException e) { System.out.println("Not a number.")<span>; </span> } }
return input<span>; </span> }
private static void printFactors(int number) { if (number == 0) { System.out.println("Infinite factors.")<span>; </span> } else { for (int i = 1; i <= number; i++) { for (int j = 1; j <= number; j++) { if (i * j == number) { System.out.print(i + ", ")<span>; </span> } } } } } }</span>
Answer: Maintenance. This is the stage where software is updated and hardware issues are fixed if and when they occur. Retirement. In this final stage, hardware becomes unusable or no longer needed and it needs to be properly removed from the fleet