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