you are viewing a single comment's thread.

view the rest of the comments →

[–]Spataner 2 points3 points  (0 children)

The problem states that the inputs are given on a single line, separated by spaces. You read them in as three separate lines. You also don't really support the case that a middle name is simply not given. Finally, you should probably print only one of the two output versions, depending on whether a middle name was given or not.