Question: write code to retrieve that name and surname from the email address and display the person's name and surname in the following format: Name Surname
write code to retrieve that name and surname from the email address and display the person's name and surname in the following format: Name Surname
Example: If the email address is j..h@domain.com the name must be displayed as John Smith.
Improve the program by allowing the user to enter a number of email addresses.
For each email address, extract the name and surname and put a string together in the format Name Surname. Assign the name surname string to an array of type string called arrNames. The arrNames array must contain all the names and surnames of the email addresses.
Write a function called displayArr that will receive the arrNames array and count variable as parameters and display the list of names in the array.

Enter an email address in the format name.surname@domain.com (X to stop): john.smith@gmail.com Enter and email address is in the format name. surname@domain.com (X to stop): Buck.johnson@gmail.com Enter and email address is in the format name. surname@domain.com (X to stop): maddison. Hope@gmail.com Enter and email address is in the format name.surname@domain.com (X to stop): x List of names: 1. John Smith 2. Buck Johnson 3. Maddison Hope
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
