#include #include using namespace std; int main () { string firstLast, lastFirst; string firstName, lastName; char middleInitial; cout << "Enter a single word first name: "; cin >> firstName; cin.ignore(100, '\n'); cout << endl; //cout <<"The first name is " << firstName << endl; cout << "Enter the last name, this might be a phrase: "; getline(cin, lastName); firstLast = firstName + ' ' + lastName; lastFirst = lastName + ", " + firstName; cout << "The name in first-last format is " << firstLast << endl; cout << "The name in last-first format is " << lastFirst << endl; cout << "The name in last-first-initial format is "; cout << lastFirst << ", " << middleInitial << "." << endl; return 0; }