Java examples for java.lang:int
quantity Of Factors
//package com.java2s; public class Main { public static long quantityOfFactors(long number) { long quantity = 0; for (int i = 1; i <= number; i++) { if (isDividedBy(number, i)) { quantity++;//from w w w . j a va2 s. c om } } return quantity; } public static boolean isDividedBy(double dividend, double divisor) { return (dividend % divisor == 0); } }