Write a program that askes the user to enter a password. the password should not
ID: 3920660 • Letter: W
Question
Write a program that askes the user to enter a password. the password should not contain spaces. After your program reads the password from keyboard, it will call a special function named encrypt(char[]) which encrypts the password according to the following rules: (assume the password is small letters) 1. reverse the word. 2. if it contains the character 's' then replace it with $ 3. if it contains the character 'a' then replace it with@ 4. if it contains the character 'o' then replace it with 'O' (zero) The encrypted password should be stored in a file named login.txtExplanation / Answer
#include #include void encrypt(char str[]) { int n = strlen(str); int i; char ch; // reverse the word for(i = 0; iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.