Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string input = Console.ReadLine();
- int adekvatno = 0;
- string chars = "~`!@#$%^&*()_-+={[}]|:;'<,>.?/";
- char[] symbols = { '~', '`', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '-', '+', '=', '{', '[', '}', ']', '|', ':', ';', '<', ',', '>', '.', '?', '/' };
- for (int a = 0; a < symbols.Length; a++)
- {
- if (input.Contains(symbols[a]))
- {
- Console.WriteLine("Has symbols");
- adekvatno++;
- break;
- }
- }
- if(adekvatno == 0)
- {
- Console.WriteLine("The password must contains at least 1 special character");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement