After you press a button, it records which button was pressed. However, it then goes on to check again if a button is pressed. Your finger is pressing the button, so your code just assumes you pressed another button. It records it, then checks again, your finger is still on the button, so it records it. Your program now thinks you pressed 3 buttons in a few millionths of a second.
Challenge Question: How do you prevent your code from thinking one button press is more than one?
Your code ends because you have this
for (i; i < 3; i++) when it needs to be for (int i = 0; i < 3; i++)
same goes for the "j" for loop.