Question: 2) Write a method named findFactors which takes three parameters of type int: start, finish, and num. Use a while loop to count the numbers
2) Write a method named findFactors which takes three parameters of type int: start, finish, and num. Use a while loop to count the numbers in the range start to finish (inclusive) which are divisible by num. The method returns the count using return type of int. Declare any additional variables that you use. The outline of the method is given below :(Hint: Use % operator.) public int findFactors (int start, int finish, int num) int count 0 return count
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
