Question: my code oroblem2.cpp rite a program which asks the user to enter their full name (First Middle Last sing getline)) and then either either prints

 my code oroblem2.cpp rite a program which asks the user tomy codeenter their full name (First Middle Last sing getline)) and then either

oroblem2.cpp rite a program which asks the user to enter their full name (First Middle Last sing getline)) and then either either prints out their middle name, or prints Error:no middle name" if they entered a name without a middle name (less than two spaces) 1 #include iostream 2 #include . String 3 using namespace std int main) 6 cout "Please enter your full name: 7 string name 8 getline(cin, name); 2 3 f (name. find"" 5 int i - name.find("") string remname name substr i+1) i remname.find(" ) string Middle remname. substr(, i) cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!