Salem, I will do so, sorry about that. I guess I need to find the right placement where to insert the if statement.
As for the actual problem at hand, here is the actual assignment that was provided:
Write a function - maxDivs() - that takes two integers such as low and high and assigns the integer that has the largest number of divisors among all the integers that lie between low and high to an output parameter - num - and the number of divisors of num to another output parameter - divs. For example, if low and high are 20 and 50, the function assigns 48 to num since 48 has the largest number of divisors between 20 and 50 and assigns 10 to divs since 48 has 10 divisors - more than any other in the 20-50 range.
Write another function - numDivs() - that takes an integer as its only parameter and returns its number of divisors. For example, if its input parameter is 24, it returns 8 as its number of divisors.
Write a main program that reads two integers for low and high and passes them to maxDivs() function. maxDivs() function in turn gets the number of divisors for each integer between low and high by calling numDivs() function for each integer in the range.
Print both the integer with the largest number of divisors and the number of divisors it has, as output by maxDivs(), in main.
You must read the range of integers and print the results in main only. You must not use any global variables. You must use the two functions, as specified, in addition to main. Not following instructions will result in significant loss of points.
I'm going to work on this some more with the suggestions you guys provided, I really appreciate it. I am really new to this programming language but I hope to learn more and can become really proficient. I have read my assignment over and over again and kept modifying it based on my understanding from the context that was given.