You must put bias resistors to GND on the switches, then follow the logic of your program, but do not forget to explain your proyect a little next time.
NB: It is useful that you send in your post the scheme and the program in a ZIP file to avoid to do it on our part, this facilitates the dynamic of the posts.