logo CodeStepByStep logo

count_factors

Language/Type: C fencepost parameters string
Related Links:
Author: Allison Obourn (on 2020/09/14)

Write a function named count_factors that accepts an integer as its parameter and returns the number of factors of that integer. For example, a call of count_factors(20) should return 6 due to it having factors 1, 2, 4, 5, 10, 20.

Function: Write a C function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.