using static System.Console;
using System.Collections.Generic;
var isPasswordValid = "no";
WriteLine("Enter the username you want to use for the site");
var userName = ReadLine();
while (isPasswordValid == "no")
WriteLine("Enter the password you want to use for the site.");
WriteLine("Entry must be at least 10 characters, ending with a number and containing at least one special character $, # or &");
var password = ReadLine();
bool isLastCharNumeric = int.TryParse(password[password.Length - 1].ToString(), out outInt);
if (password.Length < 10 || !isLastCharNumeric || (!password.Contains("$") && !password.Contains("#") && !password.Contains("&")))
WriteLine("Password is invalid! Please try again!");
if (password.Length < 10)
WriteLine("**Password entered is not at least 10 characters.");
WriteLine("**Password entered does not end with a number.");
if (!password.Contains("$") && !password.Contains("#") && !password.Contains("&"))
WriteLine("**Password entered does not contain one of the following special characters $#&");
WriteLine("Thank you! Site registration is complete.");