Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            int One;
            int Seconde;

            Console.WriteLine("enter your first number");
            Console.WriteLine("==========================");
            Console.WriteLine("==========================");
            One = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("enter your second number");
            Console.WriteLine("==========================");
            Console.WriteLine("==========================");
            Seconde = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("==========================");
            Console.WriteLine("==========================");
            Console.Write("enter your operator");

            Calcul Rslt = new Calcul(One, Seconde);

            switch (Console.ReadLine())
            {
            case "a":
                Rslt.PrintAdd();
                break;

            case "b":
                Rslt.PrintSub();
                break;

            case "c":
                Rslt.PrintMul();
                break;

            case "d":
                if (Seconde == 0)
                {
                    Console.WriteLine("enter A nother number without 0");
                }
                else
                {
                    Rslt.PrintDiv();
                }
                break;

            case "q":
                Console.WriteLine("thla!!");
                Environment.Exit(0);


                break;
            }
        }
Ejemplo n.º 2
0
 public void Test1()
 {
     Calcul claculator = new Calcul();
 }