Exercise
Password As String
Objetive
Write a C# program to ask the user for their username and password (both should be strings) and repeat it as many times as necessary until the entered name is "username" and the password is "password".
Example Code
using System;
public class exercise51
{
public static void Main()
{
string user, password;
do
{
Console.Write("Enter a user: ");
user = Console.ReadLine();
Console.Write("Enter a password: ");
password = Console.ReadLine();
}
while (user != "user" && password != "password");
Console.WriteLine("Bye!");
}
}