title: an algorithm to check the strength of the password in c/c++
body: <p>I tried to make an algorithm to check if a string has upper, lower and a digit in it, and if it has it should print "strong password", if not "weak password". but it doesn't seem to be working.</p>
  
  <pre><code>int main() 
  {
      int i = 0;
      char string1[100];
  
      printf("Please enter password\n");
      gets(string1);
  
      if(strlen(stirng1) &lt; 6)
      {
          printf("Password is too short\n");
      }
      if(islower(string1[i]) &amp;&amp; isupper(string1[i]) &amp;&amp; isdigit(string1[i]))
      {
          printf("Strong Password\n");
      }
      else
      { 
          printf("Weak Password\n");
      }   
      return 0;
  }
  </code></pre>