Example #1
0
 public static void Program10()
 {
     Console.WriteLine("Summation of Primes:");
     Console.WriteLine("Enter Max Limit");
     Console.WriteLine(Program1to10.sumationOfPrimes(Convert.ToInt64(Console.ReadLine())));
     Console.WriteLine("End:");
 }
Example #2
0
 public static void Program7()
 {
     {
         Console.WriteLine("Nth Prime Number:");
         Console.WriteLine("Enter the position of Prime Number needed:");
         Console.WriteLine(Program1to10.NthPrimeNumber(Convert.ToInt32(Console.ReadLine())));
     }
 }
Example #3
0
 public static void Program6()
 {
     {
         Console.WriteLine("Largest Square Difference:");
         Console.WriteLine("Enter your number:");
         Console.WriteLine(Program1to10.LargestSquareDifference(Convert.ToInt32(Console.ReadLine())));
     }
 }
Example #4
0
 public static void Program5()
 {
     {
         Console.WriteLine("Smallest positive number evenly disvisible by all number from 1 to 20");
         Console.WriteLine(Program1to10.SmallestMultiple(20));
         Console.WriteLine("End of Function:");
     }
 }
Example #5
0
        public static void Program8()
        {
            Console.WriteLine("Reading from file:");
            string series = Helper.readFromFile(@"C:\Users\ddesai\Desktop\1000DigitNumber");

            Console.WriteLine("Series read from file sucessful.");
            Console.WriteLine("Enter the number of cosecutive number whos product we want");
            Console.WriteLine(Program1to10.LargestProductInSeries(series, Convert.ToInt32(Console.ReadLine())));
        }
Example #6
0
 /// <summary>
 /// Solution for Program 1
 /// </summary>
 public static void Program1()
 {
     Console.WriteLine("Enter the Maximum Number.");
     Console.WriteLine(Program1to10.sumOfMultiplesof3and5(Convert.ToInt32(Console.ReadLine())));
     Console.WriteLine("End of Function.");
 }
Example #7
0
 public static void Program9()
 {
     Console.WriteLine("Special Pythagorean triplet");
     Console.WriteLine("Enter the sum of three numbers:");
     Console.WriteLine(Program1to10.SpecialPythagoreanTripletProduct(Convert.ToInt32(Console.ReadLine())));
 }
Example #8
0
 /// <summary>
 /// Solution for Program 2
 /// </summary>
 public static void Program3()
 {
     Console.WriteLine("Enter you number: ");
     Console.WriteLine(Program1to10.largestPrimeFactor(Convert.ToInt64(Console.ReadLine())));
     Console.WriteLine("End of Function:");
 }
Example #9
0
 /// <summary>
 /// Solution for Program 2
 /// </summary>
 public static void Program2()
 {
     Console.WriteLine("Sum of Even Fibnumber is: ");
     Console.WriteLine(Program1to10.sumofEvenFib());
     Console.WriteLine("End of Function:");
 }