Help with boole

hey guys i need help with the boole i have an assignment in class and im pretty sure i have to use the boole in the programming code
In the program i have to ask the user to input a password that contains:
-at least 6 characters in length
-must contain at least one uppercase letter and at least one lowercase letter
-must contain at least one digit
I also have to write a function to write a function to check if the password entered (as a string) is valid

Thanks
closed account (zb0S216C)
jeezy wrote:
Help with boole

Specifically?

A Boolean has only two values, both of which are literal constants: true and false.
true represents 1 and false represents 0.

Wazzak
this is the logic i have for it

/*
main{
need to take a string
call a function (validate) that returns valid/notvalid
if valid: display password accepted
if invalid: ask user to try again
keep a count of how many invalid attempts the user tried
if 3 times or more, terminate the program
if less than 3 times, prompt againyh6t4
}

bool validate(char* vpassword){
int length =0;
bool bool6, boollc, booluc, boold;
check if length is > 6
for(int i=0; i<20; i++)
{
if (vpassword[i] != '\0')
{
length = length +1;
}
}
if (length <6)
{
bool6 = 1;
}

check if there is lower case
islower

check if there is upperacase
isupper

check if there is a digit

Topic archived. No new replies allowed.