(Solved) : 410 Lab Name Format Many Documents Use Specific Format Person S Name Write Program Whose I Q44066303 . . .
in c++ please Name format
4.10 LAB: Name format Many documents use a specific format for a person’s name. Write a program whose input is: firstName middleName lastName, and whose output is: lastName, firstName middlelnitial. Ex: If the input is Pat Silly Doe, the output is: Doe, Pat s. If the input has the form firstName lastName, the output is lastName, firstName. Ex: If the input is: Julia Clark, the output is: Clark, Julia LAB ACTIVITY 4.10.1: LAB: Name format 6/10 | main.cpp Load default template.. + 5 int main() { NOO string firstName; string middleName; string lastName; string formatName; 10 11 cin >> firstName; cin >> middleName; cin >> lastName; 14 if (middleName.find(middleName) != string::npos) { //middleName.size() >=0 cout << lastName << “, ” «< firstName << ” ” << middleName.at(0) « “.” << endl; 19 21 22 if (middleName.find(middleName) == string: Inpos) { cout << LastName << “, ” << firstName << endl; } Show transcribed image text 4.10 LAB: Name format Many documents use a specific format for a person’s name. Write a program whose input is: firstName middleName lastName, and whose output is: lastName, firstName middlelnitial. Ex: If the input is Pat Silly Doe, the output is: Doe, Pat s. If the input has the form firstName lastName, the output is lastName, firstName. Ex: If the input is: Julia Clark, the output is: Clark, Julia LAB ACTIVITY 4.10.1: LAB: Name format 6/10 | main.cpp Load default template.. + 5 int main() { NOO string firstName; string middleName; string lastName; string formatName; 10 11 cin >> firstName; cin >> middleName; cin >> lastName; 14 if (middleName.find(middleName) != string::npos) { //middleName.size() >=0 cout
Expert Answer
Answer to 4.10 LAB: Name format Many documents use a specific format for a person’s name. Write a program whose input is: firstNam…
OR