Question: How to write in C++? Given that email addresses are in the following format: firstName.lastName@yahoo.com (a) Write a function getEmailAddress that prompts a user to
How to write in C++?
Given that email addresses are in the following format:
firstName.lastName@yahoo.com
(a) Write a function
getEmailAddress
that prompts a user to enter an e-mail ad-
dress and returns it.
(b) Write a function
extract
that takes as its parameter an e-mail address and extracts
from it the firstname and lastname.
(c) Write a function
capitalize
that takes as its parameters a string and capitalizes
its first letter.
(d) Write a function
display
that displays the name in the following format:
lastName, firstName
(e) Write a program that repeatedly prompts the user to enter
an e-mail address. The
program should then extract from it the first and last names an
d output them in the
previous format. For example,
Enter an e-mail address -- steve.kerr@yahoo.com
Kerr, Steve
Try again (Y/N) -- Y
Enter an e-mail address -- mike.brown@yahoo.com
Brown, Mike
Try again (Y/N) -- N
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
