Question: Using C++ A person's initials is the first letter of their first name, followed by a period, followed by the first letter of their last
Using C++
A person's initials is the first letter of their first name, followed by a period, followed by the first letter of their last name, followed by a period. For example, the initials for sarah lopez are S.L. Write a program that prompts the user for a first name and then prompt the user for a last name. Have the program display the user's initials. As part of your solution, define a function named initials, which takes 2 arguments: the first name and the last name. The function returns the person's initials as a string. Because the function arguments don't need to be changed and are complex data types, you should pass them into the function as const references. Hint: use the substr function or the index operator of the string data type.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
