Please edit your post and fix the formatting of the code. The statements should not all start in the first column. Nested statements should be indented 3-4 spaces to reflect the logic.
Can you explain what problems you are having with the code? Describe what you want the code to do.
Post the program's current output and add some comments to it saying what you want it to be.