AJumboKestrel1432
Coder
[CODE lang="csharp" title="Code - C#"]using System;
namespace Password_Bank_Code_
{
class Program
{
static void Main(string[] args)
{
//Bank Vault Password!
Console.ForegroundColor = ConsoleColor.White;
Console.BackgroundColor = ConsoleColor.Black;
string UserPassword = " ";
string password = "pass";
if (password == UserPassword)
{
if (password == UserPassword)
{
Console.WriteLine("Access Granted! ");
Console.WriteLine("Current Money Balance : 450");
Console.WriteLine("Would you like to withdraw some money? Y or N.");
if (password == UserPassword)
{
Console.WriteLine("Access Granted! ");
Console.WriteLine("Current Money Balance : 450");
Console.WriteLine("Would you like to withdraw some money? Y or N.");
if (password == UserPassword)
{
Console.WriteLine("Access Granted! ");
}
else
{
Console.WriteLine("You have entered the wrong password too many times. You are now locked out.");
}
}
else
{
Console.WriteLine("The Password is incorrect. You have 1 more attempt.");
UserPassword = Console.ReadLine();
Console.Clear();
}
}
else
{
Console.WriteLine("The Password is incorrect. You have 2 more attempts.");
UserPassword = Console.ReadLine();
Console.Clear();
}
}
else
{
Console.WriteLine("Please enter the passowrd!");
UserPassword = Console.ReadLine();
Console.Clear();
}
if (password == UserPassword)
{
}
else
{
Console.WriteLine("The Password is incorrect. You have 2 more attempts.");
UserPassword = Console.ReadLine();
}
if (password == UserPassword)
{
}
else
{
UserPassword = Console.ReadLine();
Console.Clear();
}
if (password == UserPassword)
{
}
else
{
Console.WriteLine("The Password is incorrect. You have 1 more attempt.");
UserPassword = Console.ReadLine();
}
if (password == UserPassword)
{
Console.WriteLine("Access Granted! ");
Console.Clear();
int monbal = 450;
Console.WriteLine("Current Money Balance : " + monbal);
Console.WriteLine("Would you like to withdraw some money? Y or N.");
string take = Console.ReadLine();
Console.Clear();
string idk = "Y";
string idk2 = "N";
if (take == idk)
{
int money;
Console.WriteLine("How much?");
money = int.Parse(Console.ReadLine());
if (money > monbal)
{
Console.Clear();
Console.WriteLine("Sorry, but you dont have that much money! ");
}
else if (money < monbal)
{
Console.Clear();
Console.WriteLine("Sure thing!");
int monbal2 = monbal - money;
Console.Clear();
Console.WriteLine("You now have " + monbal2 + " money left! ");
}
else
{
Console.Clear();
Console.WriteLine("I'm sorry, but that is not a valid number...");
}
}
else if (take == idk2)
{
Console.WriteLine("Ok,that's fine. Bye.");
}
else
{
Console.WriteLine("I'm sorry, but i dont quite understand that.");
}
}
else
{
UserPassword = Console.ReadLine();
}
if (password == UserPassword)
{
}
else
{
Console.Clear();
Console.WriteLine("You have entered the wrong password too many times. You are now locked out.");
}[/CODE]
namespace Password_Bank_Code_
{
class Program
{
static void Main(string[] args)
{
//Bank Vault Password!
Console.ForegroundColor = ConsoleColor.White;
Console.BackgroundColor = ConsoleColor.Black;
string UserPassword = " ";
string password = "pass";
if (password == UserPassword)
{
if (password == UserPassword)
{
Console.WriteLine("Access Granted! ");
Console.WriteLine("Current Money Balance : 450");
Console.WriteLine("Would you like to withdraw some money? Y or N.");
if (password == UserPassword)
{
Console.WriteLine("Access Granted! ");
Console.WriteLine("Current Money Balance : 450");
Console.WriteLine("Would you like to withdraw some money? Y or N.");
if (password == UserPassword)
{
Console.WriteLine("Access Granted! ");
}
else
{
Console.WriteLine("You have entered the wrong password too many times. You are now locked out.");
}
}
else
{
Console.WriteLine("The Password is incorrect. You have 1 more attempt.");
UserPassword = Console.ReadLine();
Console.Clear();
}
}
else
{
Console.WriteLine("The Password is incorrect. You have 2 more attempts.");
UserPassword = Console.ReadLine();
Console.Clear();
}
}
else
{
Console.WriteLine("Please enter the passowrd!");
UserPassword = Console.ReadLine();
Console.Clear();
}
if (password == UserPassword)
{
}
else
{
Console.WriteLine("The Password is incorrect. You have 2 more attempts.");
UserPassword = Console.ReadLine();
}
if (password == UserPassword)
{
}
else
{
UserPassword = Console.ReadLine();
Console.Clear();
}
if (password == UserPassword)
{
}
else
{
Console.WriteLine("The Password is incorrect. You have 1 more attempt.");
UserPassword = Console.ReadLine();
}
if (password == UserPassword)
{
Console.WriteLine("Access Granted! ");
Console.Clear();
int monbal = 450;
Console.WriteLine("Current Money Balance : " + monbal);
Console.WriteLine("Would you like to withdraw some money? Y or N.");
string take = Console.ReadLine();
Console.Clear();
string idk = "Y";
string idk2 = "N";
if (take == idk)
{
int money;
Console.WriteLine("How much?");
money = int.Parse(Console.ReadLine());
if (money > monbal)
{
Console.Clear();
Console.WriteLine("Sorry, but you dont have that much money! ");
}
else if (money < monbal)
{
Console.Clear();
Console.WriteLine("Sure thing!");
int monbal2 = monbal - money;
Console.Clear();
Console.WriteLine("You now have " + monbal2 + " money left! ");
}
else
{
Console.Clear();
Console.WriteLine("I'm sorry, but that is not a valid number...");
}
}
else if (take == idk2)
{
Console.WriteLine("Ok,that's fine. Bye.");
}
else
{
Console.WriteLine("I'm sorry, but i dont quite understand that.");
}
}
else
{
UserPassword = Console.ReadLine();
}
if (password == UserPassword)
{
}
else
{
Console.Clear();
Console.WriteLine("You have entered the wrong password too many times. You are now locked out.");
}[/CODE]