Where are you stuck? The code you posted doesn't have a main function...
Are you hoping we'll write the code for you?