write a static method countfactors that accepts in integer parameter returns the number of factors of the integer. countfactors(24) returns 8 because 1, 2, 3, 4, 6, 8, 12, and 24 are factors of 24. write a static method isprime which returns whether or not an integer is prime. this method must call countfactors. example: isprime(27) returns false and isprime(47) returns true. write a static method countprimes that accepts in integer parameter n returns the number of primes from 2 to n. you must call isprime(). countprimes(24) returns 9 because 2, 3, 5, 7, 11, 13, 17, 19, 23 are primes less than or equal to 24.



Answer :

Other Questions