Beispiel #1
0
        static void Main(string[] args)
        {
            Korisnik k = new Korisnik("8987");
            Bankomat p = new Bankomat();

            do
            {
                Console.WriteLine("Unesite pin kod\n");
                if (!(int.TryParse(Console.ReadLine(), out int pin))) //KAD NAM NESTO NETREBA STAVLJAMO _
                {
                    break;
                }
                if (k.PinKod.Equals(pin.ToString()))
                {
                    do
                    {
                        Meni();
                        if (!(int.TryParse(Console.ReadLine(), out int izbor)))
                        {
                            break;
                        }
                        switch (izbor)
                        {
                        case 1:
                            Console.WriteLine("Koliko zelite da uplatite?\n");
                            if (!(int.TryParse(Console.ReadLine(), out int uplati)))
                            {
                                break;
                            }
                            p.Uplata(uplati);
                            break;

                        case 2:
                            Console.WriteLine("Koliko zelite da isplatite?\n");
                            if (!(int.TryParse(Console.ReadLine(), out int isplati)))
                            {
                                break;
                            }
                            p.Isplata(isplati);
                            break;

                        case 3:
                            Console.WriteLine(p.trenutno());
                            break;

                        case 'q':
                            break;
                        }
                    } while (true);
                }
                else
                {
                    Console.WriteLine("Pin kod nije tacan, pokusajte ponovo");
                }
            } while (true);
        }
        static void Main(string[] args)
        {
            Bankomat b1 = new Bankomat();

            b1.Input();

            Console.WriteLine("Введите сумму:");

            b1.read_sum = Int32.Parse(Console.ReadLine());

            Console.WriteLine("Выдать с разменом?  1 - Да;   2 - Нет");

            string quest = Console.ReadLine();

            b1.Check(quest);

            if (Int32.Parse(quest) == 1)
            {
                b1.Output_1();
            }
        }
Beispiel #3
0
 public App()
 {
     bank     = new Bank();
     bankomat = new Bankomat();
 }