Exemplo n.º 1
0
    public static void Main(string[] args)
    {
        System.Console.WriteLine("Hello workd");
        int ch = 0;

        do
        {
            Console.WriteLine("1. Exit");
            Console.WriteLine("2. Positive and Negative number");
            Console.WriteLine("3. Even and Odd number");
            Console.WriteLine("4. Sum of first N natural numbers");
            Console.WriteLine("5. Sum of Number in range");
            Console.WriteLine("6. Greatest of two numbers");
            Console.WriteLine("7. Greatest of Three numbers");
            Console.WriteLine("8. Prime number");
            Console.WriteLine("9. Prime Number in range..");
            Console.WriteLine("10. Sum of Digits..");
            Console.WriteLine("11. Reverse of Number.");
            Console.WriteLine("12. Palindrome checker..");
            Console.WriteLine("13. Check Palindrome for number.");
            Console.WriteLine("14. Armstrong Number..");
            Console.WriteLine("15. Armstrong Number within range..");
            Console.WriteLine("16. Fibonacci Series..");
            Console.WriteLine("17. Factorial of Number.");
            Console.WriteLine("18. Factors of number.");
            Console.WriteLine("19. Strong Number or not.");
            Console.WriteLine("20. Power of Number.");
            Console.WriteLine("21. Perfect Number..");
            Console.WriteLine("22. Automorphic Number..");
            Console.WriteLine("23. Harshad Number..");
            Console.WriteLine("24. Abundant Number..");
            Console.WriteLine("25. Friendly pair..");
            Console.WriteLine("26. Gcd Or Hcf");
            Console.WriteLine("27. Gcd Or Hcf using euclidean");
            Console.WriteLine("28. LCM of 2 Numbers..");
            Console.WriteLine("29. Binary to Decimal..");
            Console.WriteLine("30. Binary to Octal..");
            Console.WriteLine("31. Decimal To Binary..");
            Console.WriteLine("32.  Decimal To Octal..");
            Console.WriteLine("33. Octal To Binary..");
            Console.WriteLine("34. Octal to Decimal..");
            Console.WriteLine("35. Quadrant In Coordinates..");
            Console.WriteLine("36. Permutation of Classroom..");
            Console.WriteLine("37. Handshake Program..");
            Console.WriteLine("38. Addition of Two fractions..");
            Console.WriteLine("39. Replace Zero with One's..");
            Console.WriteLine("40. Expressed Sum of Two Prime Number..");
            Console.WriteLine("41. Check Vowel");
            Console.WriteLine("42. CharacterIsAlphabetOrNot");
            Console.WriteLine("43. Area of circle");
            Console.WriteLine("44. ASCII value of character..");
            Console.WriteLine("45. Prime number in a range..");
            Console.WriteLine("46. Print Plus and minus.");
            Console.WriteLine("47. Replace string with underscore");
            Console.WriteLine("48. Find digits in integer.");
            Console.WriteLine("49. Number of days in month of year.");
            Console.WriteLine("50. Convert Number to words.");
            Console.WriteLine("51. ExactlyXDivisors.");
            Console.WriteLine("52. Square Root Of QuadraticEquation");
            Console.WriteLine("53. Smallest Number in Array.");
            Console.WriteLine("54. Second Smallest Number in Array.");
            Console.WriteLine("55. Largest Number in array.");
            Console.WriteLine("56. Largest and Smallest number in Array.");
            Console.WriteLine("57. Sum of elements in array.");
            Console.WriteLine("58. Reverse the array.");
            Console.WriteLine("59. Sort Arrays in Half Parts.");
            Console.WriteLine("60. Sorting of an Array.");
            Console.WriteLine("61. Frequency of numbes in array.");
            Console.WriteLine("62. Longest Palindrome in array.");
            Console.WriteLine("63. Distinct elements in array");
            Console.WriteLine("64. Repeating numbers in array.");
            Console.WriteLine("65. Non Repeating numbers in array.");
            Console.WriteLine("66. Removing duplicates elements from array.");
            Console.WriteLine("67. Minimum scalar product of two arrays.");
            Console.WriteLine("68. Maximum scalar product of two arrays.");
            Console.WriteLine("69. Count of even and odd number.");
            Console.WriteLine("70. Find all symmetric elements in array.");
            Console.WriteLine("71. Max Product of Sub array.");
            Console.WriteLine("72. To find arrays are disjoint or not.");
            Console.WriteLine("73. Determine whether array is subset of other array.");
            Console.WriteLine("74. Check If All The Numbers Of Arrays Can Be Made Equal.");
            Console.WriteLine("75. The sum of minimum absolute difference of the given array");
            Console.WriteLine("76. Sort An Array According To Order Defined By Other Array");
            Console.WriteLine("77. Replace each element by its rank in the given array");
            Console.WriteLine("78. Equilibrium Index.");
            Console.WriteLine("79. Rotating array towards left.");
            Console.WriteLine("80. Rotating array towards right.");
            Console.WriteLine("81. Length of String.");
            Console.WriteLine("82. Toggle each character in string.");
            Console.WriteLine("83. Number of vowels in string.");
            Console.WriteLine("84. Remove vowels from string.");
            Console.WriteLine("85. Check string palindrome or not.");
            Console.WriteLine("86. Replace substring in string.");
            Console.WriteLine("87. Reverse the string.");
            Console.WriteLine("88. Remove Char Except Alphabet.");
            Console.WriteLine("89. Remove space from string.");
            Console.WriteLine("90. Replace brackets from expression.");
            Console.WriteLine("91. Sum Of Numbers Of String");
            Console.WriteLine("92. Capitialize first and last letter of word in string.");
            Console.WriteLine("93. Frequency of character in string.");
            Console.WriteLine("94. Non repeating characters in string");
            Console.WriteLine("95. Strings are anagram or not.");
            Console.WriteLine("96. Replace Old String In A String");
            Console.WriteLine("97. Union of 2 arrays");
            Console.WriteLine("98. Addition of 2 Matrix");
            Console.WriteLine("99. Bubble sort.");
            ch = Convert.ToInt32(Console.ReadLine());
            switch (ch)
            {
            case 2: Utility.PostiveAndNegativeNumber();
                break;

            case 3:
                Utility.EvenOddNumber();
                break;

            case 4:
                Utility.SumOfFirstNNaturalNumber();
                break;

            case 5:
                Utility.SumOfNumbersInRange();
                break;

            case 6:
                Utility.GreatestOfTwoNumber();
                break;

            case 7: Utility.GreatestOfThreeNumber();
                break;

            case 8: Utility.PrimeNumber();
                break;

            case 9: Utility.PrimeNumberInRange();
                break;

            case 10: Utility.SumOfDigitsOfANumber();
                break;

            case 11: Utility.ReverseOfANumber();
                break;

            case 12: Utility.CheckPalindrome();
                break;

            case 13: Utility.CheckPalindromeForNumber();
                break;

            case 14: Utility.ArmstrongNumber();
                break;

            case 15: Utility.ArmstrongNumberWithinRange();
                break;

            case 16: Utility.FibonacciSeries();
                break;

            case 17: Utility.FactorialOfNumber(10);
                break;

            case 18: Utility.FactorsOfNumber();
                break;

            case 19: Utility.StrongNumber();
                break;

            case 20: Utility.PoweroFNumber();
                break;

            case 21: Utility.PerfectNumber();
                break;

            case 22: Utility.AuthomorphicNumber();
                break;

            case 23: Utility.HarshadNumber();
                break;

            case 24: Utility.AbdundantNumber();
                break;

            case 25: Utility.FriendlyPair();
                break;

            case 26: Utility.GcdOrHcf();
                break;

            case 27: Utility.EuclideanAlgorithm(5, 10);
                break;

            case 28: Utility.LcmFor(4, 2);
                break;

            case 29: Utility.BinaryToDecimal();
                break;

            case 30: Utility.BinaryToOctal();
                break;

            case 31: Utility.DecimalToBinary();
                break;

            case 32: Utility.DecimalToOctal();
                break;

            case 33: Utility.OctalToBinary();
                break;

            case 34: Utility.OctalToDecimail();
                break;

            case 35: Utility.QuadrantInCoordinates();
                break;

            case 36: Utility.PermutationInClassroom();
                break;

            case 37: Utility.HandShakeProgram();
                break;

            case 38: Utility.AdditionOfTwoFraction();
                break;

            case 39: Utility.Replace0With1v2();
                break;

            case 40: Utility.ExpressedAsSumOfTwoPrimeNumber();
                break;

            case 41: Utility.CheckVowel();
                break;

            case 42: Utility.CharacterIsAlphabetOrNot();
                break;

            case 43: Utility.AreaOfCircle();
                break;

            case 44: Utility.ASCIIValueOfCharacter();
                break;

            case 45: Utility.PrimeNumberBetweenMinAndMax();
                break;

            case 46: Utility.PrintPlusAndMinus();
                break;

            case 47: Utility.ReplaceStringWithUnderScore();
                break;

            case 48: Utility.NumberOfDigitsInAnInteger();
                break;

            case 49: Utility.ProgramOfNumberOfDays();
                break;

            case 50: Utility.ConvertNumberToWords();
                break;

            case 51: Utility.ExactlyXDivisors();
                break;

            case 52: Utility.SquareRootOfQuadraticEquation();
                break;

            case 53: Utility.SmallestNumberInArray();
                break;

            case 54: Utility.SecondSmallestNumberInArray();
                break;

            case 55: Utility.LargestNumberInArray();
                break;

            case 56: Utility.LargestAndSmallestNumberInArray();
                break;

            case 57: Utility.SumOfElementsInArray();
                break;

            case 58: Utility.ReverseTheArray();
                break;

            case 59: Utility.SortArrayInHalfParts();
                break;

            case 60: Utility.SortingOfArray();
                break;

            case 61: Utility.FrequencyOfElementsInArray();
                break;

            case 62: Utility.LongestPalindromeInArray();
                break;

            case 63: Utility.DistinctElementInArray();
                break;

            case 64: Utility.RepeatingElementsInArray();
                break;

            case 65: Utility.NonRepeatingElementsInArray();
                break;

            case 66: Utility.RemovingDuplicateElementsInArray();
                break;

            case 67: Utility.MinimumScalarProductOfTwoArray();
                break;

            case 68: Utility.MaximumScalarProductOfTwoNumber();
                break;

            case 69: Utility.CountOfEvenAndOddNumberInArray();
                break;

            case 70: Utility.SymmetricPairInArray();
                break;

            case 71: Utility.MaximumProductOfSubArray();
                break;

            case 72: Utility.DisjointArray();
                break;

            case 73: Utility.DetermineTheArrayIsSubsetOfAnotherArray();
                break;

            case 74: Utility.CheckIfAllTheNumbersOfArraysCanBeMadeEqual();
                break;

            case 75: Utility.FindingMinimumSumOfAbsoluteDifferenceOfGivenArray();
                break;

            case 76: Utility.SortAnArrayAccordingToOrderDefinedByOtherArray();
                break;

            case 77: Utility.ReplaceEachElementByItsRankInTheGivenArray();
                break;

            case 78: Utility.EquilibriumIndex();
                break;

            case 79: Utility.RotatingArrayTowardsLeft();
                break;

            case 80: Utility.RotatingArrayTowardsRight();
                break;

            case 81: Utility.FindStringLength();
                break;

            case 82: Utility.ToggleEachCharacterInString();
                break;

            case 83: Utility.CountOfVowels();
                break;

            case 84: Utility.RemoveVowelsFromString();
                break;

            case 85: Utility.CheckStringPalindromeOrNote();
                break;

            case 86: Utility.ReplaceSubStringInString();
                break;

            case 87: Utility.ReverseTheString();
                break;

            case 88: Utility.RemoveCharExceptAlphabet();
                break;

            case 89: Utility.RemoveSpaceFromString();
                break;

            case 90: Utility.ReplaceBracketsFromExpression();
                break;

            case 91: Utility.SumOfNumbersOfString();
                break;

            case 92: Utility.CapitalizeFirstAndLastLetterOfEachWordOfString();
                break;

            case 93: Utility.FrequencyOfCharacterInString();
                break;

            case 94: Utility.NonRepeatingCharacterInString();
                break;

            case 95: Utility.StringsAreAnagramOrNot();
                break;

            case 96: Utility.ReplaceOldStringInAString();
                break;

            case 97: Utility.SetOperation();
                break;

            case 98: Utility.AdditionOf2DArray();
                break;

            case 99: Utility.BubbleSort();
                break;

            case 100: Utility.SelectionSort();
                break;
            }
        }while (ch != 1);
    }