Password Validation
I failed with Test Case #10 and Test Case #11. Can someone help me? This is my code: namespace Program { class Program { static void Main(string[] args) { string password = Console.ReadLine(); Password p = new Password(); p.CheckPassword(password); } } public class Password { public List<string> speCharacters = new List<string>() { "!", "@", "#", "$", "%", "&", "*", }; public void CheckPassword(string password) { int count = 0; int length = 0; if (password.Length > 7) { foreach (string s in speCharacters) { if (password.Contains(s)) { count++; } } foreach (int num in password) { length++; } if (count >= 2 && length >= 2) { Console.WriteLine("Strong"); } else { Console.WriteLine("Weak"); } } else { Console.WriteLine("Weak"); } } } } Is anything wrong? Help me.