Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace UDEMY_SECTION_4
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Create a username: ");
- string un = Console.ReadLine();
- Console.WriteLine("Create a password: ");
- string pw = Console.ReadLine();
- Console.WriteLine("Enter in username: ");
- string inputUN = Console.ReadLine();
- Console.WriteLine("Enter in password: ");
- string inputPW = Console.ReadLine();
- while (inputUN != un && inputPW != pw)
- {
- Console.WriteLine("Incorrect username or password. Try again.");
- Console.WriteLine("Enter in username: ");
- inputUN = Console.ReadLine();
- Console.WriteLine("Enter in password: ");
- inputPW = Console.ReadLine();
- if (inputUN == un && inputPW == pw)
- {
- Console.WriteLine("You are logged in!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement