it looks like your only checking the first 3 numbers... you need to make if statements that check all the other numbers in the array also...
so right now your checking
if ((a[i] + a[i+1] + a[i+2]) == a[5])
which is checking if the first +second + third == sixth
next you would prolly want to check
if ((a[i] + a[i+2] + a[i+3]) == a[5])
checking if the first + third + fourth == sixth
doin it the way im mentioning ya prolly dont really need to put em in the loop...
just do if ((a[0] + a[1] + a[2]) == a[5])
seems like there should be a better way instead of just tons of if statements...
__________________
-=JStrider=-
~Clatto Verata Nicto
|