in reply to check possible combination of sum using given array
This sounds like a common homework problem. Googling something like all possible combinations of numbers that add up to N gives tons of results.