The braces at lines 11 and 13 serve no purpose, remove them.
The endl at lines 10 and 12 output the newline character. You should get rid of one or the other.
By the way, you could use the [output][/output] tags to format the program output properly, like this: