Question: How do I make the expected output here? import java.util.*; public class LabProgram { public static void main(String[] args){ Scanner sc = new Scanner(System.in); System.out.print(Enter

How do I make the expected output here?
import java.util.*; public class LabProgram { public static void main(String[] args){ Scanner sc = new Scanner(System.in); System.out.print("Enter a positive integer: "); int num = sc.nextInt(); System.out.print("The factors for " + num + " is "); int i = 2;
while(i Your output Enter a positive integer: The factors for 120 is 2,2,2,3,5, Expected output Enter a positive integer: The factors for 120 is 2, 2, 2, 3, 54
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
