Question: Write a program that allows the user to enter his or her name. The program should output a username for entry into a website. The

Write a program that allows the user to enter his or her name. The program should output a username for entry into a website. The user should be prompted to enter a first name, middle initial, and last name. If the user doesn’t have a middle initial, the entry should be “none.” In this case, the output will be a username that concatenates the first and last names with a dot between them. If the user has a middle initial, the output username should be in the form first.middle_initial.last. For example, a user whose name is Harold Nguyen would have Harold.Nguyen for his username and a user whose name is Maria Anna Lopez would have Maria.A.Lopez for a username.

Step by Step Solution

3.28 Rating (163 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The program uses string library to store first name middle name ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Prelude to Programming Questions!