예제 #1
0
        static void Main(string[] args)
        {
            var jsonResponse = new Posts();



            var myDict = new Dictionary <string, string>();

            foreach (var prop in jsonResponse.GetType().GetProperties())
            {
                myDict.Add(prop.Name, prop.GetValue(jsonResponse)?.ToString());
            }


            var input = new int[] { 5, 4, 3, 2, 1 };

            MergeSort sort = new MergeSort();
            // , Username and message.
            var result = sort.Sort(input);

            //    Dictionary<MenuSelection, string> dict = new Dictionary<MenuSelection, string>();
            //    dict.Add(MenuSelection.CreateCustomer, "Create Customer");
            //    dict.Add(MenuSelection.CreateAccount, "Create Account");
            //    dict.Add(MenuSelection.SetAccountBalance, "Set Account Balance");
            //    dict.Add(MenuSelection.DisplayAccountBalance, "Display Account Balance");
            //    dict.Add(MenuSelection.Exit, "Exit");


            //    string showValue = string.Empty;
            //    for (int i = 1; i <= (int)MenuSelection.MaxMenuSelection; i++)
            //    {

            //        Console.WriteLine($"[{i}] { dict[(MenuSelection)i]}");
            //    }

            //左正常 右邊加一

            //float fl = 9.81234567f;//小數點最多到第六位
            //float f2 = 9.81234568f;//小數點最多到第六位
            //Console.WriteLine(fl == f2);
            //decimal d1 = 1.2345678912234567891234568848m;
            //decimal d2 = 1.23456789122345678912345684m;
            //Console.WriteLine(d1==d2);



            Console.ReadKey();
        }
예제 #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Enter the no of the program ");
            Console.WriteLine("Cheak two string are anagram or not(1)");
            Console.WriteLine("Find Prime nos between 1 to 1000(2)");
            Console.WriteLine("Vending Machine(3)");
            Console.WriteLine("Find Day of the week(4)");
            Console.WriteLine("Temprature conversion(5)");
            Console.WriteLine("Mothly Payment(6)");
            Console.WriteLine("SqureRoot using Newton's Law(7)");
            Console.WriteLine("Searching and sorting(8)");
            Console.WriteLine("Binary search for word list(9)");
            Console.WriteLine("Insertion sort of word list(10)");
            Console.WriteLine("Bubble sort of numbers(11)");
            Console.WriteLine("Conversion(12)");
            Console.WriteLine("Binary(13)");
            Console.WriteLine("Merge Sort(14)");
            Console.WriteLine("Number Game(15)");


            int p = int.Parse(Console.ReadLine());

            switch (p)
            {
            case 1:
                Anagram a = new Anagram();
                a.ChkAnagram();
                break;

            case 2:
                Prime b = new Prime();
                b.ChkPrime();
                break;

            case 3:
                VendingMachine c = new VendingMachine();
                c.CountNote();
                break;

            case 4:
                DayOfWeek d  = new DayOfWeek();
                int       m  = int.Parse(args[0]);
                int       d1 = int.Parse(args[1]);
                int       y  = int.Parse(args[2]);
                Console.WriteLine(d.FindDay(d1, m, y));
                break;

            case 5:
                TempratureConversion e = new TempratureConversion();
                Console.WriteLine("Enter the temprature");
                int e1 = int.Parse(Console.ReadLine());
                e.Conversion(e1);
                break;

            case 6:
                MonthlyPayment f = new MonthlyPayment();
                Console.WriteLine("Enter the Principal loan amount");
                int p1 = int.Parse(Console.ReadLine());
                Console.WriteLine("Enter the year");
                int y1 = int.Parse(Console.ReadLine());
                Console.WriteLine("Enter the rate of interest");
                double r1 = double.Parse(Console.ReadLine());
                Console.WriteLine(f.FindMPayment(p1, y1, r1));
                break;

            case 7:
                SqrtN g = new SqrtN();
                g.FindSqrt();
                break;

            case 8:
                Utility h = new Utility();

                //Binary search for Integer

                Console.WriteLine("Enter the size of the array");
                int   n  = int.Parse(Console.ReadLine());
                int[] h1 = new int[n];
                Console.WriteLine("Enter the sorted elements in assending order");
                for (int i = 0; i < n; i++)
                {
                    h1[i] = int.Parse(Console.ReadLine());
                }
                Console.WriteLine("Enter the element you want to search");
                int x  = int.Parse(Console.ReadLine());
                int h2 = h.BinarrySearchInt(h1, x);

                Console.WriteLine("The element is present in the {0}th place", h2);

                //Binary search for a string

                Console.WriteLine("Enter how many elements you want to add");
                int      n1 = int.Parse(Console.ReadLine());
                String[] h3 = new String[n];
                Console.WriteLine("Enter Strings");
                for (int i = 0; i < n; i++)
                {
                    h3[i] = Console.ReadLine();
                }
                Console.WriteLine("Enter the string you want to search");
                String x1 = Console.ReadLine();
                int    h4 = h.BinarrySearchString(h3, x1);

                Console.WriteLine("The element is present in the {0}th place", h4);


                // Insertion sort for Integer

                Console.WriteLine("Enter the size of the array for sorting");
                int n2 = int.Parse(Console.ReadLine());
                Console.WriteLine("Enter  numbers");
                int[] arr = new int[n2];
                for (int i = 0; i < n2; i++)
                {
                    arr[i] = int.Parse(Console.ReadLine());
                }
                int[] arr2 = h.InsertionSortInt(arr);
                Console.WriteLine("Sorted Array Elements :");
                for (int i = 0; i < n2; i++)
                {
                    Console.Write(arr2[i]);
                    Console.Write(" ");
                }
                Console.WriteLine("\n");


                //Insertion sort for String

                Console.WriteLine("Enter how many elements you want to add for sorting");
                int      n3 = int.Parse(Console.ReadLine());
                String[] h5 = new String[n3];
                Console.WriteLine("Enter Strings");
                for (int i = 0; i < n3; i++)
                {
                    h5[i] = Console.ReadLine();
                }
                String[] arr3 = h.InsertionSortString(h5);
                Console.WriteLine("Sorted Array Elements :");
                for (int i = 0; i < n2; i++)
                {
                    Console.Write(arr3[i]);
                    Console.Write(" ");
                }
                Console.WriteLine("\n");

                break;

            case 9:
                BinarySearchWord v = new BinarySearchWord();
                Console.WriteLine("Enter how many elements you want to add");
                int      n4 = int.Parse(Console.ReadLine());
                String[] h6 = new String[n4];
                Console.WriteLine("Enter Strings");
                for (int i = 0; i < n4; i++)
                {
                    h6[i] = Console.ReadLine();
                }
                Console.WriteLine("Enter the string you want to search");
                String x3 = Console.ReadLine();
                int    h9 = v.BinarrySearch(h6, x3);

                Console.WriteLine("The element is present in the {0}th place", h9);
                break;

            case 10:
                InsertionSortWord z = new InsertionSortWord();
                Console.WriteLine("Enter how many elements you want to add for sorting");
                int      n5  = int.Parse(Console.ReadLine());
                String[] h10 = new String[n5];
                Console.WriteLine("Enter Strings");
                for (int i = 0; i < n5; i++)
                {
                    h10[i] = Console.ReadLine();
                }
                String[] arr4 = z.InsertionSort(h10);
                Console.WriteLine("Sorted Array Elements :");
                for (int i = 0; i < n5; i++)
                {
                    Console.Write(arr4[i]);
                    Console.Write(" ");
                }
                Console.WriteLine("\n");

                break;

            case 11:
                BubbleSort w = new BubbleSort();
                Console.WriteLine("Enter the size of the array for sorting");
                int n6 = int.Parse(Console.ReadLine());
                Console.WriteLine("Enter  numbers");
                int[] ar = new int[n6];
                for (int i = 0; i < n6; i++)
                {
                    ar[i] = int.Parse(Console.ReadLine());
                }
                int[] ar1 = w.BubbleSortI(ar);
                Console.WriteLine("Sorted Array Elements :");
                for (int i = 0; i < n6; i++)
                {
                    Console.Write(ar1[i]);
                    Console.Write(" ");
                }
                Console.WriteLine("\n");
                break;

            case 12:
                Convertion z1 = new Convertion();
                Console.WriteLine("if you want to convert decimal to binary press 1 and binary to decimal press 0");
                int de = int.Parse(Console.ReadLine());
                if (de == 1)
                {
                    z1.ToBinary();
                }
                if (de == 0)
                {
                    z1.ToDecimal();
                }

                break;

            case 13:
                //Convertion s = new Convertion();
                Console.WriteLine("Enter a decimal no");
                //int[] ar4= s.ToBinary();
                int    a5  = int.Parse(Console.ReadLine());
                Binary b1  = new Binary();
                int    ar5 = b1.SwapNibbles(a5);
                Console.WriteLine("After Swapping the no became {0}", ar5);

                break;

            case 14:
                MergeSort w1 = new MergeSort();
                Console.WriteLine("Enter the size of the array");
                int n7 = int.Parse(Console.ReadLine());
                Console.WriteLine("Enter the elements to the array");
                int[] iarray = new int[n7];
                for (int i = 0; i < n7; i++)
                {
                    iarray[i] = int.Parse(Console.ReadLine());
                }
                w1.Sort(iarray);
                for (int i = 0; i < n7; i++)
                {
                    Console.Write(iarray[i] + " ");
                }
                break;

            case 15:
                NumberGame r2 = new NumberGame();
                r2.Game();
                break;
            }
        }
예제 #3
0
        /// <summary>
        /// Main method
        /// </summary>
        /// <param name="args">The arguments.</param>
        public static void Main(string[] args)
        {
            try
            {
                string str = null;
                do
                {
                    Console.WriteLine("Enter 1 For Anagram Program");
                    Console.WriteLine("Enter 2 For Prime numbers");
                    Console.WriteLine("Enter 3 For Insertion Sort");
                    Console.WriteLine("Enter 4 For Bubble Sort");
                    Console.WriteLine("Enter 5 For Merge Sort");
                    Console.WriteLine("Enter 6 For Vending Machine");
                    Console.WriteLine("Enter 7 For Temperature");
                    Console.WriteLine("Enter 8 For Square Root");
                    Console.WriteLine("Enter 9 For Decimal to Binary");
                    Console.WriteLine("Enter 10 For Nibble");
                    Console.WriteLine("Enter 11 For Binary Search of integers");
                    Console.WriteLine("Enter 12 For Binary Search of strings");
                    Console.WriteLine("Enter 13 For Insertion Sort of integers");
                    Console.WriteLine("Enter 14 For Insertion sort of strings");
                    Console.WriteLine("Enter 15 For Bubble sort of integers");
                    Console.WriteLine("Enter 16 For Bubble sort of strings");
                    Console.WriteLine("Enter 17 For Anagram and palindrome of prime numbers");
                    Console.WriteLine("Enter 18 For Binary search");
                    int num = Convert.ToInt32(Console.ReadLine());

                    switch (num)
                    {
                    case 1:
                        Anagram a = new Anagram();
                        a.StringAnagram();
                        break;

                    case 2:
                        Primenumbers p = new Primenumbers();
                        p.Isprime();
                        break;

                    case 3:
                        InsertionSort ins = new InsertionSort();
                        ins.Sortingofstrings();
                        break;

                    case 4:
                        BubbleSort bs = new BubbleSort();
                        bs.Bubblesortofint();
                        break;

                    case 5:
                        MergeSort m = new MergeSort();
                        Console.WriteLine("enter size of array");
                        int      size  = Convert.ToInt32(Console.ReadLine());
                        string[] words = new string[size];
                        Console.WriteLine("enter strings in to array");
                        for (int k = 0; k < size; k++)
                        {
                            words[k] = Console.ReadLine();
                        }

                        m.Sort(words);
                        Console.WriteLine("sorted array");

                        foreach (string sortedArray in words)
                        {
                            Console.WriteLine(sortedArray);
                            Console.ReadLine();
                        }

                        break;

                    case 6:
                        VendingMachine v = new VendingMachine();
                        v.CountCurrency();
                        break;

                    case 7:
                        Temperature t = new Temperature();
                        t.TemperatureConversion();
                        break;

                    case 8:
                        SquareRoot sq = new SquareRoot();
                        sq.FindSquareRoot();
                        break;

                    case 9:
                        DecimaltoBinary db = new DecimaltoBinary();
                        db.ConversionofDecimal();
                        break;

                    case 10:
                        Nibble nb = new Nibble();
                        nb.ToBinary();
                        break;

                    case 11:
                        Console.WriteLine("Enter the size of Array:");
                        int   arraysize = Utility.Getinteger();
                        int[] arr       = new int[arraysize];
                        Console.WriteLine("Enter " + arraysize + " Elemenets");
                        for (int i = 0; i < arr.GetLength(0); i++)
                        {
                            arr[i] = Utility.Getinteger();
                        }

                        Console.WriteLine("Enter an item to search:");
                        int item = Utility.Getinteger();

                        Utility.BinarySearch(arr, item);
                        break;

                    case 12:
                        Console.WriteLine("Enter the size of Array:");
                        int      sizeStr = Utility.Getinteger();
                        string[] s       = new string[sizeStr];
                        Console.WriteLine("Enter " + sizeStr + " Elemenets");
                        for (int i = 0; i < s.GetLength(0); i++)
                        {
                            s[i] = Utility.GetString();
                        }

                        Console.WriteLine("Enter an item to search:");
                        string itemStr = Utility.GetString();
                        Utility.BinarySearch(s, itemStr);
                        break;

                    case 13:
                        Console.WriteLine("Enter the size of Array:");
                        int   sizeIns = Utility.Getinteger();
                        int[] arrIns  = new int[sizeIns];
                        Console.WriteLine("Enter " + sizeIns + " Elemenets");
                        for (int i = 0; i < arrIns.GetLength(0); i++)
                        {
                            arrIns[i] = Utility.Getinteger();
                        }

                        Utility.InsertionSort(arrIns);
                        break;

                    case 14:
                        Console.WriteLine("Enter the size of Array:");
                        int      strsize = Utility.Getinteger();
                        string[] strIns  = new string[strsize];
                        Console.WriteLine("Enter " + strsize + " Elemenets");
                        for (int i = 0; i < strIns.GetLength(0); i++)
                        {
                            strIns[i] = Utility.GetString();
                        }

                        Utility.InsertionSort(strIns);
                        break;

                    case 15:
                        Console.WriteLine("Enter the size of Array:");
                        int   sizeBubInt = Utility.Getinteger();
                        int[] arrBubInt  = new int[sizeBubInt];
                        Console.WriteLine("Enter " + sizeBubInt + " Elemenets");
                        for (int i = 0; i < arrBubInt.GetLength(0); i++)
                        {
                            arrBubInt[i] = Utility.Getinteger();
                        }

                        Utility.BubbleSort(arrBubInt);
                        break;

                    case 16:
                        Console.WriteLine("Enter the size of Array:");
                        int      strsizeBub = Utility.Getinteger();
                        string[] strBub     = new string[strsizeBub];
                        Console.WriteLine("Enter " + strsizeBub + " Elemenets");
                        for (int i = 0; i < strBub.GetLength(0); i++)
                        {
                            strBub[i] = Utility.GetString();
                        }

                        Utility.BubbleSort(strBub);
                        break;

                    case 17:
                        AnagramAndPalindrome Ap = new AnagramAndPalindrome();
                        Ap.PalindromeOfPrimeNumbers();
                        Ap.AnagramOfPrimeNumbers();
                        break;

                    case 18:
                        BinarySearch binarysearch = new BinarySearch();
                        binarysearch.ReadFile();
                        break;

                    default:
                        Console.WriteLine("Please enter the valid input");
                        Console.ReadLine();
                        break;
                    }
                }while(str != "n");
                Console.ReadLine();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
예제 #4
0
        static void Main(string[] args)
        {
            Console.WriteLine("Functional programming");
            Console.WriteLine("----------------------");

            Console.WriteLine(" 1. All permutations of a String using iterative method and Recursion method");
            Console.WriteLine(" 2.Binary Search the Word from Word List");
            Console.WriteLine(" 3.Insertion sort in string");
            Console.WriteLine(" 4.Reads in integers prints them in sorted order using Bubble Sort");
            Console.WriteLine(" 5.Write a program to do Merge Sort of list of Strings.");
            Console.WriteLine(" 6.ne string is an anagram of another if the second is simply a rearrangement of the first");
            Console.WriteLine(" 7. Take a range of 0 - 1000 Numbers and find the Prime numbers in that range. ");
            Console.WriteLine(" 8. Extend the above program to find the prime numbers that are Anagram and Palindrome ");
            Console.WriteLine(" 9.Rewrite Use Generics for Search and Sort Algorithms");
            Console.WriteLine(" 10.Question to find your number");
            Console.WriteLine(" 11.maximum amount by which a task's completion time overshoots its deadline is minimized.");
            //Console.WriteLine("12.Customize Message Demonstration using String Function and RegEx");
            //Console.WriteLine("13.Coupone Number");
            //Console.WriteLine("14.Stop watch");
            //Console.WriteLine("15.Tic Toe Tik");
            //Console.WriteLine("16.Vending Machine");
            //Console.WriteLine("17.dayOfWeeks");
            //Console.WriteLine("18.celcius to Ferhinheit and vic versa");
            //Console.WriteLine("19.Monthly pament");
            //Console.WriteLine("20.Newton method");
            //Console.WriteLine("21.Decimal to binary");
            //Console.WriteLine("22.swap nibble");



            int str = int.Parse(Console.ReadLine());

            switch (str)
            {
            case 1:
                PermutationOfString.Permu();
                break;

            case 2:
                BinarySearch.Binary();
                break;

            case 5:
                MergeSort.Merge1();
                break;

            //case 4:
            //    HarmonicNumber.Harmonic();
            //    break;
            case 3:
                InsertionSort.Insertion();
                break;
            //case 6:
            //    FactorNumber.Factor();
            //    break;
            //case 7:
            //    TwoDArray.Two();
            //    break;
            //case 8:
            //    SumOfThree.Sum();
            //    break;
            //case 9:
            //    Distance.Dist();
            //    break;
            //case 10:
            //    Quadratic.Quad();
            //    break;
            //case 11:
            //    WindChill.Wind();
            //    break;
            //case 12:
            //    Gambler.Game();
            //    break;
            //case 13:
            //    Cupon_number.Cupon();
            //    break;
            //case 14:
            //    Stopwatchs.Stop();
            //    break;
            //case 15:
            //    TicTakTeo.Tic();
            //    break;
            //case 16:
            //    VendingMachine.Vending();
            //    break;
            //case 17:
            //    DaysOfWeek.Days();
            //    break;
            //case 18:
            //    TemperatureConversion.Temperature();
            //    break;
            //case 19:
            //    MonthlyPayment.Payment();
            //    break;

            default:
                break;
            }
        }
예제 #5
0
        static void Main(string[] args)
        {
            Console.WriteLine("select your choice : ");
            Console.WriteLine(" 1 -> Permutations Of a String  program ");
            Console.WriteLine(" 2 -> Binary Search the Word from Word List program ");
            Console.WriteLine(" 3 -> Insertion Sort program ");
            Console.WriteLine(" 4 -> Bubble Sort program ");
            Console.WriteLine(" 5 -> Merger Sort program ");
            Console.WriteLine(" 6 -> Anagram Detection program ");
            Console.WriteLine(" 7 -> Prime Number program ");
            Console.WriteLine(" 8 -> Primenumber_Palindrome_Anagram  program ");
            Console.WriteLine(" 9 ->                           program ");
            Console.WriteLine("10 -> Guess Number Game program ");
            Console.WriteLine("11 -> ListOfTask program ");
            Console.WriteLine("12 ->                           program ");

            Console.Write("enter your choice : ");
            int choice = Utility.Util.ReadInt();

            switch (choice)
            {
            case 1:
                StringPermutation sp = new StringPermutation();
                sp.StringPermutationMethod();
                break;

            case 2:
                BinarySearch binarysearch = new BinarySearch();
                binarysearch.BinarySearchMethod();
                break;

            case 3:
                InsertionSort insertionsort = new InsertionSort();
                insertionsort.InsertionSortMethod();
                break;

            case 4:
                BubbleSort bubblesort = new BubbleSort();
                bubblesort.BubbleSortMethod();
                break;

            case 5:
                MergeSort mergesort = new MergeSort();
                mergesort.MergeSortMethod();
                break;

            case 6:
                Anagram anagram = new Anagram();
                anagram.AnagramMethod();
                break;

            case 7:
                PrimeNumber prime = new PrimeNumber();
                prime.PrimeNumberMethod();
                break;

            case 8:
                PalindromeAndAnagram pna = new PalindromeAndAnagram();
                pna.PalindromeAndAnagramMethod();
                break;

            case 10:
                GuessNumber guessnumber = new GuessNumber();
                guessnumber.GuessNumberMethod();
                break;

            case 11:
                ListOfTask lot = new ListOfTask();
                lot.ListOfTaskMethod();
                break;

            default:

                break;
            }
        }
예제 #6
0
        /// <summary>
        /// Defines the entry point of the application.
        /// </summary>
        /// <param name="args">The arguments.</param>
        static void Main(string[] args)
        {
            Console.WriteLine("1: Anagram Detection");
            Console.WriteLine("2: Prime Numbers between 0-1000");
            Console.WriteLine("3: Prime Numbers that are Anagram or Palindrome (0-1000)");
            Console.WriteLine("4: Utility Class");
            Console.WriteLine("5: Find Number");
            Console.WriteLine("6: Binary Search");
            Console.WriteLine("7: Insertion Sort");
            Console.WriteLine("8: Bubble Sort");
            Console.WriteLine("9: Merge Sort");
            Console.WriteLine("10: Vending Machine");
            Console.WriteLine("11: Day of Week");
            Console.WriteLine("12: Temperature Conversion");
            Console.WriteLine("13: Monthly Payment");
            Console.WriteLine("14: Square Root");
            Console.WriteLine("15: To Binary");
            Console.WriteLine("16: Binary Swap Nibbles");
            int choice = 0;

            while (!(choice > 0 && choice < 17))
            {
                try
                {
                    Console.Write("Enter your choice: ");
                    choice = Convert.ToInt32(Console.ReadLine());
                }
                catch (FormatException)
                {
                    //Console.WriteLine(Ex);
                }
            }
            switch (choice)
            {
            case 1:
                AnagramDetection anagramDetection = new AnagramDetection();
                anagramDetection.anagram();
                break;

            case 2:
                PrimeNumbers primeNumbers = new PrimeNumbers();
                primeNumbers.prime();
                break;

            case 3:
                PrimeAnagramPalindrome primeAnagramPalindrome = new PrimeAnagramPalindrome();
                primeAnagramPalindrome.checkForPrimeAnagramPalindrome();
                break;

            case 4:
                int[] integerArray = { 10, 8, 7, 4, 3, 5, 0, 1, 2, 6, 9 };
                integerArray = Utility.BubbleSort(integerArray);
                Console.WriteLine("After Bubble Sort:");
                for (int i = 0; i < integerArray.Length; i++)
                {
                    Console.Write(integerArray[i] + " ");
                }
                Console.WriteLine();
                int pos1 = Utility.BinarySearch(6, 0, 11, integerArray);
                if (pos1 == -1)
                {
                    Console.WriteLine("Not Found!");
                }
                else
                {
                    Console.WriteLine("Found at location: " + pos1);
                }

                Console.WriteLine();

                string[] stringArray = { "saad", "fahad", "saba", "zeeshan", "ashhar", "owais" };
                stringArray = Utility.BubbleSort(stringArray);
                Console.WriteLine("After Bubble Sort:");
                for (int i = 0; i < stringArray.Length; i++)
                {
                    Console.Write(stringArray[i] + " ");
                }
                int pos2 = Utility.BinarySearch("saad", 0, 11, stringArray);
                Console.WriteLine();
                if (pos2 == -1)
                {
                    Console.Write("Not Found!");
                }
                else
                {
                    Console.Write("Found at location: " + pos2);
                }
                break;

            case 5:
                FindingNumber findingNumber = new FindingNumber();
                findingNumber.Find();
                break;

            case 6:
                BinarySearch search = new BinarySearch();
                search.binarySearch();
                break;

            case 7:
                InsertionSort insertionSort = new InsertionSort();
                insertionSort.Sort();
                break;

            case 8:
                BubbleSort bubbleSort = new BubbleSort();
                bubbleSort.Sort();
                break;

            case 9:
                MergeSort mergeSort = new MergeSort();
                mergeSort.Sort();
                break;

            case 10:
                VendingMachine vendingMachine = new VendingMachine();
                vendingMachine.machine();
                break;

            case 11:
                DayOfWeek dayOfWeek = new DayOfWeek();
                dayOfWeek.getDay();
                break;

            case 12:
                TemperatureConversion conversion = new TemperatureConversion();
                conversion.temperatureConversion();
                break;

            case 13:
                MonthlyPayment monthlyPayment = new MonthlyPayment();
                monthlyPayment.payment();
                break;

            case 14:
                SquareRoot root = new SquareRoot();
                root.calculateSquareRoot();
                break;

            case 15:
                ConvertToBinary convert = new ConvertToBinary();
                convert.conversion();
                break;

            case 16:
                BinarySwapNibbles binarySwapNibbles = new BinarySwapNibbles();
                binarySwapNibbles.swapNibbles();
                break;

            default:
                Console.WriteLine("Wrong Choice!");
                break;
            }
        }