Question: Write a program that takes a first name and last name entered by the user and displays the last name, a comma, and the first
Write a program that takes a first name and last name entered by the user and displays the last name, a comma, and the first initial, followed by a period: Enter a first and last name: Lloyd Fosdick
Output: Fosdick, L.
The user's input may contain extra spaces before the first name, between the first and last names, and after the last name.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
