Answers for "factors"

1

factors

public class Factors {

    public static void main(String[] args) {

        int number = 60;

        System.out.print("Factors of " + number + " are: ");
        for(int i = 1; i <= number; ++i) {
            if (number % i == 0) {
                System.out.print(i + " ");
            }
Posted by: Guest on April-03-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language