Basically what the program is suppose to do is verify that the username that was entered (in previous code to register) matches the username that is inputted right now. So the user is allowed 3 chances to get it correct, but instead the code is not breaking out of the loop. Can anyone see what is wrong/needs fixing?
//User Enters username, and then username is verified
do
{
Console.Write("Please enter your username: ");
user_login = Console.ReadLine();
if (user_login != username)
{
Console.WriteLine("The username does not match the one in our database");
Console.WriteLine("Please try again");
Console.WriteLine("");
count_user = +1;
}
else
{
Console.WriteLine("Your username matches!");
Console.WriteLine("");
break;
}
} while (user_login != username && count_user < 3) ;
count_user = +1;should becount_user += 1;. Please use a local debugger rather than Stack Overflow.