Menu

[solved] – Question 97226

Write a program to generate passwords. The program should ask the user for a phrase and number, and then create the password based on our special algorithm. The algorithm to create the password is as follows:

If the users input word is less than 8 characters, output Password not long enough.
If the users input word is greater than or equal to 8 characters, do the following:
Replace es with @
Replace s or S with $
Replace t or T with +
Capitalize the word and add the number to the end.
Sample Run

Enter your word: zebras
Enter a number: 62
Password not long enough.

Enter your word: newyorkcity
Enter a number: 892
Password: N@wyorkci+y892

Expert Answer


OR


Leave a Reply

Your email address will not be published. Required fields are marked *