public static void Demonstrate(uint value, CurrencyType type) { Console.Write($"Выдача {value} {type}: "); var bancomat = new Bancomat(); var banknotes = bancomat.ToIssueBanknotes(value, type); var result = string.Join(" + ", banknotes.Select(b => b.ToString())); Console.WriteLine(result); }
static void Main(string[] args) { Console.WriteLine("Введите размер денежных средств, которые хотите получить, и валюту через пробел (RUR - рубли, $ - доллары)"); var requestedMoney = Console.ReadLine(); var bankomat = new Bancomat(); Console.WriteLine(bankomat.GetMoney(requestedMoney)); Console.ReadLine(); }
private static void Main(string[] args) { var bancomat = new Bancomat(); (var money, var success) = bancomat.Withdraw(CurrencyType.Ruble, 2050); PrintMoney(money, success); (money, success) = bancomat.Withdraw(CurrencyType.Ruble, 2033); PrintMoney(money, success); Console.ReadKey(); }