Question: Write a code that asks the user for a size of a random generated password, the number of integers, characters ( uppercase and lowercase )
Write a code that asks the user for a size of a random generated password, the number
of integers, characters uppercase and lowercase and special characters and generates a
password based on this requirement.
The code should do the following:
Ask the user to enter the size of the password up to characters.
Using this size as an input, ask the user for the distribution of numbers, characters
both upper case, and lower case and special characters. All of this must have a
positive number cannot be zero and must be equal to the size of input.
Using the ASCII character set and rand function, generate the appropriate password.
Check and ensure that no number, character or special character appears more than
once in the password.
Use a shuffle to ensure that the types are randomly distributed.
Display the generated password for the user in the console.
The following error checking should be done:
The correct size of the input.
The correct distribution of characters.
The program should terminate when the console input is "exit". Each iterations should
display a different password with the same inputs.
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
