Change your code to:
namespace trial
{
public class Password
{
static void Main(string[] args)
{
Console.Write("Enter a username: ");
string username = Console.ReadLine();
Console.Write("Enter a password: ");
string pass = Console.ReadLine();
do
{
if (username == "john" && pass == "mjamaa")
Console.WriteLine("Login Error");
}
while (username == "john" && pass == "mjamaa");
Console.WriteLine("Login successful");
}
}
}
Regards, http://ift.tt/1e8mnao
No comments:
Post a Comment