Question: need a flowgrorithm for this code: #include #include #include #include void password_read(char password[]); int password_check(char password[]); int main(){ char password[100]; int sum; password_read(password); sum =

need a flowgrorithm for this code:

#include

#include

#include

#include

void password_read(char password[]);

int password_check(char password[]);

int main(){

char password[100];

int sum;

password_read(password);

sum = password_check(password);

if (sum) {

printf("Your password is correct ");

}else {

printf("Your password is lackinging ");

}

system("pause");

return 0;

}

//reads the users input

void password_read(char password[]) {

printf("Enter password: ");

printf("Password need to be Uppercase, Digit and $ symbol: ");

scanf("%s", password);

}

//Password need to be Uppercase, Digit and $ symbol

//Password need to be Uppercase, Digit and $ symbol

int password_check(char password[]) {

int upper = 0;

int digit = 0;

int dollar = 0;

int i;

for (i = 0; i < strlen(password); i++) {

if (isupper(password[i])) {

upper = 1;

}

else if (isdigit(password[i])) {

digit = 1;

}

else if (password[i] == '$') {

dollar = 1;

}

}

return (upper && digit && dollar);

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!