Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace passwordprogram
- {
- class Program
- {
- static void Main(string[] args)
- {
- string usernameInput;
- string passwordInput;
- string username = "User";
- string password = "Pass";
- Console.WriteLine("Please enter your username and password below!");
- Console.Write("Username: ");
- usernameInput = Console.ReadLine();
- Console.Write("Password: ");
- passwordInput = Console.ReadLine();
- if (username == usernameInput && password == passwordInput)
- {
- Console.WriteLine("Welcome back {0}!", username);
- System.Diagnostics.Process.Start(@"C:\Windows\System32\Notepad.exe");
- }
- else if (username == usernameInput | password == passwordInput)
- Console.WriteLine("Incorrect username/password combo.");
- else
- Console.WriteLine("Incorrect! Try again");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement