Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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) coutStep 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