It is an implementation of making change algorithm, It provides you no of possibilities and gives you all possible change.
Enter total sum that you want to change : 5
How many coins do you have ? 3
Enter coin 1 : 1
Enter coin 2 : 2
Enter coin 3 : 3
There are 5 possibilities.
[{1=5}, {1=3, 2=1}, {1=2, 3=1}, {1=1, 2=2}, {2=1, 3=1}]
1 1 1 1 1
1 1 1 2
1 1 3
1 2 2
2 3
1 Total sum that you want to change should be greater than zero.
2 Number of coins that you have should be greater than zero.
3 The coin amount should be greater than zero.