I would like to calculate the number of different types of days i can have that equal my set value.
For example, if someone has 30 days annual leave as part of there employment i would like to calculate what different sorts of holiday they could take.
An example would be:
5, 10, 5, 2, 2, 1, 5
As you can see the above will equal to 30.
The idea of the calculation is to give a prospective employee an idea of what sorts of days off they can take.
The returned values could also be:
10, 10, 10
This means that i need to calculate number combinations that equal to the total annual leave number.
The challenge can be completed in ANY programming langauge!