Question: 6 THE FACTOR COUNT PROBLEM Write a function named factorCount() that accepts an integer (assumed to be positive) as its input parameter, returns a count

 6 THE FACTOR COUNT PROBLEM Write a function named factorCount() that

6 THE FACTOR COUNT PROBLEM Write a function named factorCount() that accepts an integer (assumed to be positive) as its input parameter, returns a count of its positive factors in its output parameter, and returns the largest factor (not counting 1 or the number itself, via the return statement. For example, the eight factors of 24 are 1, 2, 3, 4, 6, 8, 12, and 24, so the call factorCount (24, fCount) should return 12 and set fCount to 8. If there are no factors other than 1 and the number itself (such as 3), return -1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!