need help with array

@ps991 thanks

still i have a problem it seems that the for loop is not working because whenever i press a single button the program will just execute and end

and it gives me an output of 1 0 0 for button1 and 2 0 0 , 3 0 0 for button2 and button3