Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication3
- {
- class Program
- {
- static void Main(string[] args)
- {
- string Username;
- string Password;
- string Answer1;
- string Newname;
- string Newpassword;
- Console.WriteLine("Hello and welcome to hazims program please sign in to continue");
- Console.WriteLine("Username:");
- Username = Console.ReadLine();
- if (Username.Equals("Hazim"))
- {
- Console.WriteLine("Password:");
- Password = Console.ReadLine();
- if (Password.Equals("Hej123"))
- {
- Console.WriteLine("Welcome Master");
- }
- else
- {
- Console.WriteLine("Wrong password");
- }
- }
- else
- {
- Console.WriteLine("Your account does not exist");
- Console.WriteLine("Do you want to create a new one?");
- Console.WriteLine("Yes Or No");
- Answer1 = Console.ReadLine();
- if (Answer1.Equals("Yes"))
- {
- Console.WriteLine("Please enter your new username");
- Newname = Console.ReadLine();
- Console.WriteLine("Enter your new password");
- Newpassword = Console.ReadLine();
- Console.WriteLine("Welcome" + Newname);
- Console.WriteLine("Please log in with your password " + Newname);
- Console.ReadLine();
- if (Console.ReadLine().Equals(Newpassword))
- {
- Console.WriteLine("Welcome to the program " + Newname);
- }
- else
- {
- Console.WriteLine("Wrong password please try again");
- Console.ReadLine();
- if (Console.ReadLine().Equals(Newpassword))
- {
- Console.WriteLine("Welcome to the program " + Newname);
- }
- else
- {
- Console.WriteLine("Wrong password you have 1 more try");
- Console.ReadLine();
- if (Console.ReadLine().Equals(Newpassword))
- {
- Console.WriteLine("Welcome to the program " + Newname);
- }
- else
- {
- Console.WriteLine("You have been logged out to protect your account");
- }
- }
- }
- }
- else
- Console.WriteLine("Thank you for using Hazims program");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement