Skip to Content
0
Jun 11, 2009 at 12:33 PM

hw to write code for combinations???????

26 Views

hi all,

i have a small development to be done.

There is a company manufacturing products in different locations.for example it produces a product of quantiy 4 in 3 different locations.The total combinations for this is 15.it will be like this.

location1 location2 location3

(L1) (L2) (L3)

0 0 4

0 1 3

0 2 2

. . .

. . .

. . .

My requirerment is if i give the quantity and location,i want the combinations to be displayed in output.

If anyone knows the logic,help me.