Write an algorithm using pseudocode to verify that a password's length exceeds 8 characters, but is shorter than 12 characters. (INCLUSIVE 8-12)
using System;
using System.Collections.Generic;
using System.Globalization;
namespace App
{
class Program
{
static void Main(string[] args)
{
Console.Write("Enter password: ");
string password=Console.ReadLine();
if (password.Length >= 8 && password.Length <= 12)
{
Console.WriteLine("Correct password");
}
else {
Console.WriteLine("Wrong password");
}
Console.ReadLine();
}
}
}
Comments
Leave a comment