I've found a few articles on something similar but I'm still so new to coding that I feel I'm getting more confused. I picked this project to work on so if anyone can help or point me in a direction you think can best explain it for me that would be helpful or be able to dissect the code in smaller pieces.
The goal User picks a number between 1-150 The code shows all combinations of numbers that sum up to equal that number but only using numbers between 1-50 and only using 5 digits. Also number can only be used once.
Example input is 15 Output: 1, 2, 3, 4, 5 This equals 15
If it was a higher number there would be more output combinations.
So general rules Array of 5 numbers (can only use numbers between 1-50 Can only use each number once Has to equal the input Also no duplicate arrays would be nice like 1,2,3,4,5 vs 5,1,4,2,3
I'm trying to write this using Kotlin or Java but anything should help, thanks!