Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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-Ming

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

Recommended Textbook for

Advances In Spatial Databases 2nd Symposium Ssd 91 Zurich Switzerland August 1991 Proceedings Lncs 525

Authors: Oliver Gunther ,Hans-Jorg Schek

1st Edition

3540544143, 978-3540544142

More Books

Students also viewed these Databases questions