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 BankingTransaction
- {
- class Program
- {
- public static void Main(string[] args)
- {
- int amount = 1000000, deposit, withdraw, payment, al1, al2, al3,al4;
- int bank_acct;
- int password;
- int ebills = 8000;
- int wbills = 8000;
- int sbills = 8000;
- int ccard = 8000;
- Console.WriteLine("Enter your account number:");
- bank_acct = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Enter your password: ");
- password = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("1.BALANCE INQUIRY:\n");
- Console.WriteLine("2.DEPOSIT:");
- Console.WriteLine("3.WITHDRAW:");
- Console.WriteLine("4.PAYBILLS:");
- Console.WriteLine("5.EXIT\n");
- while(true) {
- int a = int.Parse(Console.ReadLine());
- Console.WriteLine("-----------------------------");
- switch (a) {
- case 1:
- Console.WriteLine("Your balance inquiry is: {0}", +amount);
- break;
- case 2:
- {
- Console.WriteLine("Enter amount to deposit:");
- deposit = int.Parse(Console.ReadLine());
- amount = amount + deposit;
- Console.WriteLine("Your balance is {0}", + amount);
- }break;
- case 3:
- {
- Console.WriteLine("Enter amount to withdraw:");
- withdraw = int.Parse(Console.ReadLine());
- amount = amount - withdraw;
- Console.WriteLine("Your balance is {0}", +amount);
- } break;
- case 4:
- Console.WriteLine("Choose bills to pay");
- Console.WriteLine("1. Electric Bill:");
- Console.WriteLine("2. Water Bill:");
- Console.WriteLine("3. School Fees:");
- Console.WriteLine("4. Credit Card:");
- int p = int.Parse(Console.ReadLine());
- Console.WriteLine("-----------------------------");
- switch (p)
- {
- case 1:
- Console.WriteLine("Your electric bills is {0}", ebills);
- Console.WriteLine("Enter amount to pay:");
- payment = int.Parse(Console.ReadLine());
- Console.WriteLine("Your payment has been successfully transacted");
- al1 = ebills - payment;
- Console.WriteLine("The payment left is: {0}", al1);
- break;
- case 2:
- Console.WriteLine("Your water bills is {0}", wbills);
- Console.WriteLine("Enter amount to pay:");
- payment = int.Parse(Console.ReadLine());
- Console.WriteLine("Your payment has been successfully transacted");
- al2 = wbills - payment;
- Console.WriteLine("The payment left is: {0}", al2);
- break;
- case 3:
- Console.WriteLine("Your school bills is {0}", sbills);
- Console.WriteLine("Enter amount to pay:");
- payment = int.Parse(Console.ReadLine());
- Console.WriteLine("Your payment has been successfully transacted");
- al3 = sbills - payment;
- Console.WriteLine("The payment left is: {0}", al3);
- break;
- case 4:
- Console.WriteLine("Your credit card is {0}", ccard);
- Console.WriteLine("Enter amount to pay:");
- payment = int.Parse(Console.ReadLine());
- Console.WriteLine("Your payment has been successfully transacted");
- al4 = ccard - payment;
- Console.WriteLine("The payment left is: {0}", al4);
- break;
- }
- break;
- case 5:
- {Console.WriteLine("Exit\n");
- }break;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement