using static System.Console;
bool validPassword = false;
WriteLine("Please enter a user name and password. Your password must be 10 characters or longer, contain either $, #, or &, and end with a number.");
if (!password.Contains("#") && !password.Contains("$") && !password.Contains("&"))
WriteLine("Your password must contain either $, #, or &. Please type a new password.");
else if (password.Length < 10)
WriteLine("Your password must be 10 characters or more. Please type a new password.");
else if (!password.EndsWith("1") && !password.EndsWith("2") && !password.EndsWith("3") && !password.EndsWith("4") && !password.EndsWith("5")
&& !password.EndsWith("6") && !password.EndsWith("7") && !password.EndsWith("8") && !password.EndsWith("9") && !password.EndsWith("0"))
WriteLine("Your password must end with a number. Please type a new password.");