Can you post what it does print out and explain what is wrong with it?


Can you explain what your logic is? You'll need to have working logic BEFORE you try to write any code.