Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions

Question

the student find other ways to meet his needs?

Answered: 1 week ago

Question

=+Does it showcase the firm's benefits?

Answered: 1 week ago

Question

=+ Does it list exciting places to go and famous sites to see?

Answered: 1 week ago