Create a script that asks the user for five email addresses and collects the domain names. Input
Question:
Create a script that asks the user for five email addresses and collects the domain names.
Input
Prompt the user five times to enter an email address. If the address does not include a "@" before a ".", it is not valid and does not count toward the five addresses.
Output
After each valid email, print just the domain name portion of the address without the extension. For example, "myname@yahoo.com" should output as "yahoo".
Once all five emails have been entered, all valid domain names should be printed again in one line, separated by spaces.
Example Program Run
This is an example of what the screen might look like after the program executes, including bold values that were input by the user.
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill