I'm assuming the user is going to be typing in either "married" or "single" (exactly in that format, without the quotes):

This is easy to solve by using a boolean flag to denote if the person is...