Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a C++ program that reads a persons full name from the keyboard. The user can either input their name as first middle last or
Write a C++ program that reads a persons full name from the keyboard. The user can either input their name as first middle last or first last. Your program should then output their last name first followed by a comma, so either last, first middle or last, first respectively. (Note: You must ensure that regardless of which way the user enters, the program will proceed past your last cin line without any extra input.)
Example 1 input: Allie Funk Example 1 output: Funk, Allie
Example 2 input: Jon Raymond Garbe Example 2 output: Garbe, Jon Raymond
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started