Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write in C++ 3. Write a program that inputs a first and last name, separated by a space, into a string variable. Use the string

image text in transcribedWrite in C++

3. Write a program that inputs a first and last name, separated by a space, into a string variable. Use the string functions to output the first and last initial. Embed your code into a do-while loop. At the end of the loop ask the user if he or she would like to repeat the program. Input the user's choice into a char using cin. If the character is 'y' then repeat the program, otherwise exit. Beware of the pitfall with newlines when cin is mixed with getline

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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