c first name then middle name or initial and then last name
Lab Description
Write a program that reads a person’s name in the following format:
first name, then middle name or initial, and then last name.
The program then outputs the name in the following format:
Last_Name, First_Name Middle_Initial.
Your program will:
- Add a period after the middle initial
- Allow for users to give no middle name or middle initial
- Capitalized the name properly
Expected Conversions/Test Cases
Taco Bell Lui -> Lui, Taco B.
taco Bell lui -> Lui, Taco B.
taco Lui -> Lui, Taco
taCO BELL lui -> Lui, Taco B.
taco b. LUI -> Lui, Taco B.
Requirements
- Your program will ask user for name input.
- Implement at least one function.
- Loop to check if user wants to stop the program.
- Comments for all functions (including main()) will follow the format as per stated in module 5.