Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
