[Solved] : Question 13554

Write a program to protect a computer against unauthorized access using a password. The program assigns a password to a variable.
The user is prompted to enter a password in order to enter the computer system.
If it is the correct password, display a message welcoming the user. If not, display a suitable message rejecting the attempted access.

Improve the program as follows:

Allow the user to enter a password three times. If the password is correct, display a suitable message. If all the attempts including the third attempt are incorrect, display a message rejecting access to the system

Possible algorithm:

1.Ask the password from the user
2.Compare the password
3. if password in incorrect
Display message to enter password again

Improve the algorithm to include all the steps of the solution in the correct order.

Expert Answer

Answer to : Question 13554

Leave a Comment


We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?