could someone tell please why the code below prints all the possibilities for the entered password exept (strong pass plus weak
#include <iostream> using namespace std; int main(){ string s; int a,b,c,d=0; cout<<"enter password:"<<endl; cin>>s; if(s.length()>8){ for(int i=0;i<s.length();i++){ if(s[i]>'a' && s[i]<'z') a=1; if(s[i]>'A' && s[i]<'Z') b=1; if(s[i]>'0' && s[i]<'9') c=1; if (!(s[i]>'a' && s[i]<'z' || s[i]>'A' && s[i]<'Z' || s[i]>'0' && s[i]<'9')) d=1; } if(a+b+c+d==4) cout<<"Very strong password"<<endl; if(a+b+c+d==3) cout<<"strong password"<<endl; if(a+b+c+d==2) cout<<"weak password"<<endl; if(a+b+c+d==1) cout<<"Very Weak password"<<endl; } else cout<<"Your password should not be less than 8 chars!"<<endl; return 0; } note:my program checks if the password is not less than 8 chars and if it contains small,capital letters along with digits and symbols