hi all,

I am about to develop a game where there a certain numbers with random numbers in it.

My actual question is how do i calculate the sum of numbers based on the click on one particular element(numbers).

EX: There would be Target of sum 15

And the numbers would be like this

1 5 6 7 8 8 9 9 4

3 4 5 9 0 3 6 7 9

6 8 6 9 4 4 3 2 1

1 2 7 5 3 7 8 0 4

And if i click the above numbers like 7+5+3 it should be 15

How do i calculate the sum of numbers based on the target(15) which i click on this numbers it should tally the target.

Could anyone please help me in solving my problem.And If you guys did not get my point please refer to the below link which is similar to it.

Thanks in advance!!