Write a program to validate a password using the following rules:
• The password must be at least six characters in length
• It must contain at least one uppercase letter.
• It must contain at least one lowercase letter.
• It must contain at least one digit (0-9).
question is above
and i am passing passward to int function
My quesion is do I use character not string?
and i saw people having 6 character even though its not a string.
is this how i do it? char passward[7] ???
I have no idea how to check how many characters there are...
and how do i find lowercase and uppercase? or is there coding to find char upper or lower ? If there is plz give me a reference page so I can base on it.
don't get confused please i am not asking for answer i need an example. Please don't do my homework for me but help me Thank you .
check out the functions in cstring,cctype,cstdlib and string libraries...
You use loop to do this checking..
for length of password if >6 printout error msg or some stuff
else proceed to next step: check every character and for every condition satisfied set flag to true...you can do this isChar, isDigit, isUpper,isLower...etc