Question: This is a C++ question and the development environment is Visual Studio 2015 Hint: Use member function of cin and cout e.g. cin.getline(), cin.get() e.g.

This is a C++ question and the development environment is Visual Studio 2015

This is a C++ question and the development environment is Visual Studio

Hint:

Use member function of cin and cout e.g. cin.getline(), cin.get() e.g. cout.put(), cout.write(), cout.width(), cout.fill()

Exercise 7.1 Write a program that asks the user to Input in TWO lines 1. Input his/her last name 2. Input his/her first name First name can be 1 word or 2 words If the user puts one space between the two words of his first name, add a hyphen to replace the space. Skip all other spaces in front of or after the first name or last name. For example: Chan Tai Ming Chan Tai-Ming Show the whole name after you read the user inputs. Hint: A string is stored in a character array. You can use a loop to check the content of every character of a string one by one, and to display the characters out one by one. STREAM VO 17

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!