Exemplo n.º 1
0
        public void First(string[] args)
        {
            try


            {
                int A;
                int B;
                int C;
                Console.WriteLine($"Type the first number: ");
                A = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine($"Now type the second number: ");
                B = Convert.ToInt32(Console.ReadLine());
                C = (A + B);
                Console.WriteLine($"{A} + {B} equals {C}");
                Console.ReadLine();
                Main_Menu mMenu = new Main_Menu();
                mMenu.Menu(args);
            }
            catch (FormatException fEx)
            {
                Console.WriteLine($"Please input a number");
                Console.ReadLine();
                Main_Menu mMenu = new Main_Menu();
                mMenu.Menu(args);
            }
        }
Exemplo n.º 2
0
        public void Third(string[] args)

        {
            try


            {
                decimal A;
                decimal B;
                decimal C;
                Console.WriteLine($"Type the first number: ");
                A = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine($"Now type the second number: ");
                B = Convert.ToInt32(Console.ReadLine());
                C = (A / B);
                Console.WriteLine($"{A} / {B} equals {C}");
                Console.ReadLine();
                Main_Menu mMenu = new Main_Menu();
                mMenu.Menu(args);
            }
            catch (Exception Ex)
            {
                Console.WriteLine($"Please input a number and do not divide by 0");
                Console.ReadLine();
                Main_Menu mMenu = new Main_Menu();
                mMenu.Menu(args);
            }
        }
Exemplo n.º 3
0
 static void Main(string[] args)
 {
     {
         Main_Menu mMenu = new Main_Menu();
         mMenu.Menu(args);
     }
 }