Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedmy codeimage text in transcribed

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

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions