Pause program for input

Hi, in my project I would like for there to be 3 buttons and the user must push the buttons in the correct order to continue. The order will be randomized and they have to guess. I know how to set up the buttons for input and check if they are pressed but, how would I make the program wait until the user finishes hitting the buttons in order to check they were pressed in the correct order?

Look into using "State Machine" coding.
here is a place to start:
http://www.thebox.myzen.co.uk/Tutorial/State_Machine.html