Esempio n. 1
0
        static void Main(string[] args)
        {
            Console.Title = "Assignment2"; //Define console title.

            menu menu = new menu(); //Create and Declare an instans of the product class.

            menu.Start(); // Call the product class start method to perform all nessesary steps for the program
        }
Esempio n. 2
0
 private void ReadInput()
 {
     while(true)
     {
         WriteMenu();                                //WriteMenu
         int choice = int.Parse(Console.ReadLine()); //Define choice
         switch (choice)                             //Start switch statement
         {
             case 1:
                 CalcAndPrint(2);                    //Run if true, same goes for case 2 & 0
                 break;
             case 2:
                 CalcAndPrint(4);
                 break;
             case 0:
                 menu MM = new menu();
                 MM.Start();                         //Call main menu
                 break;
         }
     }
 }