I am trying to create a calculator with a specific purpose. This calculator will give all possible combinations for a certain average. Is a matrix or multi dimensional array the way I should do this? The input will be from 0-7 with decimals to the hundredths. The output, as an example, for 3.07 will look something like the following as one possible combination:

0,1,2,3,4,5,6,7
0,1,2,3,4,5,6,7
0,1,2,3,4,5,6,7
0,1,2,3,4,5,6,7
0,1,2,3,4,5,6,7
0,1,2,3,4,5,6,7
0,1,2,3,4,5,6,7
0,1,2,3,4,5,6,7
0,1,2,3,4,5,6,7
0,1,2,3,4,5,6,7
0,1,2,3,4,5,6,7
0,1,2,3,4,5,6,7
0,1,2,3,4,5,6,7

I am trying to write the program so I can see all possible combinations not just one. How do I write the code for the different combinations?