Question: 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.

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
Get step-by-step solutions from verified subject matter experts
