Question
This is a C++ question related to stream I/O and the development environment is Visual Studio 2015 Write a program that asks the user to
This is a C++ question related to stream I/O and the development environment is Visual Studio 2015
Write a program that asks the user to
1. Input his/her last name (Input in TWO lines)
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.
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.
For example: Chan Tai Ming Chan Tai-MingStep 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