Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in C++ which asks you to enter a name in the form of first middle initial last. So you might enter for

Write a program in C++ which asks you to enter a name in the form of first middle initial last. So you might enter for example samuel p. clemens. Use getline to read in the string because it contains spaces. Also, apparently the shift key on your keyboard doesnt work, because you enter it all lower case. Pass the string to a function which uses .find to locate the letters which need to be upper case and use toupper to convert those characters to uppercase. The revised string should then be returned to main in the form Last, First MI where it will be displayed.

image text in transcribed

C:Windows system321cmd.exe Enter a name first mi last samuel p. clemens You entered: samuel p. clemens It was converted to: Clemens. Samuel P. Do you wish to enter another name? Enter a name first mi last donald e. knutlh You entered: donald e. knuth It was converted to: Knuth. Donald E Do you wish to enter another name? Press any key to continue

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_2

Step: 3

blur-text-image_3

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

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions