How would you create a recursive method (Either direct or indirect) for multiples.
Let's say I have two variables "a" and "b".
The java application would ask you to input numbers for a and b.
Once you completed inputting numbers it will tell if variable "b" is a multiple of "a" by means of returning or printing a boolean value (true or false).
I tried making this kind of application with the help of "%" but it ended up not being recursive.
Question
Jirarudo
Wondering if I could get some help on this:
How would you create a recursive method (Either direct or indirect) for multiples.
Let's say I have two variables "a" and "b".
The java application would ask you to input numbers for a and b.
Once you completed inputting numbers it will tell if variable "b" is a multiple of "a" by means of returning or printing a boolean value (true or false).
I tried making this kind of application with the help of "%" but it ended up not being recursive.
Link to comment
Share on other sites
6 answers to this question
Recommended Posts