Skip to content

Some computer programs try to prevent easily guessable passwords being used, by rejecting those that do not meet some simple rules.

License

Notifications You must be signed in to change notification settings

dinesh-rawat-dev/password-problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Password problem

Some computer programs try to prevent easily guessable passwords being used, by rejecting those that do not meet some simple rules. One simple rule is to reject passwords which contain any sequence of letters immediately followed by the same sequence. For example:

APPLE      Rejected  (P is repeated)
CUCUMBER   Rejected  (CU is repeated)
ONION      Accepted  (ON is not immediately repeated)
APRICOT    Accepted
COSCOS     Rejected  (COS is repeated)

Goals

Write a program which inputs a password (between 1 and 10 upper case letters) and then prints Rejected if the password is rejected, or Accepted otherwise. Your program should then terminate.

Sample run

Password: BANANA
Rejected

About

Some computer programs try to prevent easily guessable passwords being used, by rejecting those that do not meet some simple rules.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published