need help with array

int val[2];
  1. You don't need a int for those small numbers, but whatever
  2. Don't you have 3 buttons? Why do you only have 2 elements in your array?

In reference to your above question, yes