PLEASE ALWAYS USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/ http://www.cplusplus.com/articles/z13hAqkS/
Hint: You can edit your post, highlight your code and press the <> formatting button.
You can use the preview button at the bottom to see how it looks.
Your code is printing what you have told it to. Unfortunately until you post your code I have no idea what you have done or what needs fixed. With what you have posted you are not likely to get much of a response because no one knows what you have done.
If you have not read mbozzi's links do so and you will do much better.