Exercise · Loops · lesson 6 of 8
Exercise: divisor count
Write a function int divisor_count(int n) that returns the number of divisors of n. The divisors are the numbers from 1 to n that divide n with no remainder.
divisor_count(12)→6divisor_count(13)→2divisor_count(1)→1
Constraints: n is from 1 to 10000.