Why it's doesn't work? Password Rules.
I can't solve password rules. Dont recommend to check the solution!!! I cant complete 5 Test. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { string password = Console.ReadLine(); char[] nAS = { '!', '#', '$', '%', '&', '(',')', '*', ',', '+', '-' }; //введите код сюда for(int x = 0; x < nAS.Length; x++){ if(password.Contains(nAS[x])) Console.WriteLine("Invalid"); } //Btw ik there must be break but where do i put it? } } } }