How are the button switches wired? Are there pullup or pulldown resistors? What value resistors?
Please read the forum guidelines to see how to properly post code and some information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in a code block.
Please go back and fix your original post.