What is your current problem? Does the code compile? If not, post the error messages.
Does the code execute without errors? If not post the error messages.
Post what the code does output and show...