Welcome! Please read this topic for info useful to new members.

Thank you for taking the time to learn to post code correctly.

There are tutorials online that go through what you've asked. ...