You will check the user name and password combination for two users.
Both will have their own passwords.
You can combine both conditional operators: AND with OR.
using System; class Program//from ww w . jav a 2 s .c o m { static void Main(string[] args) { // Correct values string correctUsername1 = "a"; string correctPassword1 = "pass1"; string correctUsername2 = "b"; string correctPassword2 = "pass2"; // Inputs Console.Write("User name: "); string enteredUsername = Console.ReadLine(); Console.Write("Password: "); string enteredPassword = Console.ReadLine(); // Evalulating if (enteredUsername.ToLower() == correctUsername1.ToLower() && enteredPassword == correctPassword1 || enteredUsername.ToLower() == correctUsername2.ToLower() && enteredPassword == correctPassword2) { Console.WriteLine("Thanks for your books!"); } else { Console.WriteLine("Could not log you in."); } } }