+91-85006-22255
Write a program to get the factors of a give number as an array.
as an array.
class FactorsOfNumber { public static void main(String s[]) { int result[] = getFactors(50); System.out.print("The factors of 50 are : "); for(int i = 0; i < result.length; i++) { System.out.print(result[i] + ", "); } } public static int[] getFactors(int number) {
} }
Topic: Learn Arrays And Loops
Read this topic Take test on this topic
Open In App