Java program to find factors of a number

import java.util.Scanner; public class factor { public static void main(String[] args) { System.out.…