HEP 456 Module 6 Section 14 Communication and Dissemination of The Findings Arizona State University
HEP 456 Module 6 Section 14 Communication and Dissemination of The Findings HEP 456: Health Promotion Program ā¦
Ā
Week 5 Lab
#include < iostream > using namespace std;
const intSIZE = 80; const int MIN = 6; //function prototype int isValid(char pwd[]); intmain()
{ charpassword[SIZE]; while (true)
{
//put all of the conditions cout << “enter a password: “; cin.getline(password, SIZE);
if (isValid(password) == 1)
{ cout << “good password”; break;
}
else
{ cout << “password was invalid”;
}
}
system(“pause”) ;
}
int isValid(char pwd[])
{
//test each character and see if the boolean is set to true bool minLength =false; boolhasUpper = false; bool hasLower = false;bool hasDigit = false; intlength = strlen(pwd) ; if (length >= MIN)
{ minLength = true;
}
for (inti = 0; i < length; i++)
{
if (isupper(*pwd))//determines if the character is uppercase hasUpper = true;
//do the same for hasLower
//do the same for hasDigit
*pwd++; //increments your array to the next character
}
if (minLength == true && hasUpper == true&& hasLower == true&& hasDigit == true)return 1;
else
return 0; }
HEP 456 Module 6 Section 14 Communication and Dissemination of The Findings HEP 456: Health Promotion Program ā¦
NTR 100 COMPLETE Syllabus and Academic Integrity Acknowledgement Question 1 1 / 1 pts I have read the ASU ā¦
HEP 456 Module 5 Section 12 and 13 Planning for Analysis and Interpretation and Gantt chartĀ Name HEP 456: ā¦