Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The program should ask the user for their name and email address and then create a random company ID for them which should be an
The program should ask the user for their name and email address and then create a random company ID for them which should be an integer with four digits.
You will write four functions other than main in your program.
getaccount: a function which calls the following three functions, storing the values they return in three variables.
getname: asks for and returns the users name
getemail: asks for and returns the users email
calculateid: calculates and returns a new company ID for the user
After getaccount has called these three functions and saved their return values, it should return all three.
In your main function, call getaccount and save the three values it returns in variables. These variables should then be printed to the console. A sample run of the program looks like this:
Enter your name: John Smith
Enter your Email: johnsmith@college.com
Name: John Smith
Email: johnsmith@college.com
Company ID:
Step 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