Untitled
unknown
csharp
4 years ago
1.5 kB
10
Indexable
public static void Welcome()
{
bool runProgram = true;
while (runProgram)
{
MakeLine();
Console.WriteLine("Welcome to the Bank Interface, please Select What you want to do:");
Console.WriteLine("1 - View Balance");
Console.WriteLine("2 - Withdraw");
Console.WriteLine("3 - Deposit");
Console.WriteLine("0 - Quit");
var a = Console.ReadLine();
//var a = "2";
switch (a)
{
case "0":
Console.WriteLine("thanks for using the bank, Have a nice day");
runProgram = false;
break;
case "1":
ViewBalance();
break;
case "2":
Console.WriteLine("Input Withdraw amount: ");
decimal withd = Convert.ToDecimal(Console.ReadLine());
Withdraw(withd);
break;
case "3":
Console.WriteLine("Input Deposit Amount: ");
decimal depo = Convert.ToDecimal(Console.ReadLine());
Deposit(depo);
break;
}
}
}Editor is loading...