Please read this link and use it: How to get the best out of this forum - Using Arduino / Installation & Troubleshooting - Arduino Forum
The IDE contains example code for handing buttons. Try such an example to learn button usage.
What is that?
There is no "arduino code". Much can be done in old fashioned C language.
Only sometimes C## coding is needed.
Do the coding for You? I hope not.
Forum is not a free give away institution. The idea is to support members willing to learn and grow in programming.