Question: Write a method largestDivisor that takes an integer argument and returns the largest positive integer which is less than the argument that divides the argument.

Write a method largestDivisor that takes an integer argument and returns the largest positive integer which is less than the argument that divides the argument. (For example, 10 is the largest divisor of 20.) You may assume that the argument is positive. If the argument is 1, return 0 to indicate that there is no such divisor
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
