Question: 5. Write a program that prompts the user for their first name, then generates a userid formed by two letters and six digits, as
5. Write a program that prompts the user for their first name, then generates a userid formed by two letters and six digits, as follows: - The two letters come from the first name, that is, the 1st initial followed by the second non-vowel letter from the first name. The vowels are the characters a, e, i, o, and u. Design the function is vowel () to decide whether a letter is vowel or not, and in its implementation, call the find() function of string library. Use letter x as the non-vowel letter if the first name doesn't include a non-vowel letter. - The 6-digit portion is generated randomly. Design the function generate_random_number () to generate a random number between two integers. Call the cstdlib library functions srand() and rand() in the implementation of this function. Here are sample program inputs/outputs: Enter your first name: Sarah You entered: Sarah Your userid is: sr123456 Enter your first name: Aaron You entered: Aaron Your userid is: ar654321 Enter your first name: Joe You entered: Joe Your userid is: jx142536
Step by Step Solution
There are 3 Steps involved in it
It appears that youre asking how to write a program based on the instructions provided in the image Unfortunately the full text of the instructions is ... View full answer
Get step-by-step solutions from verified subject matter experts
