Exemple #1
0
        public static void Length()
        {
            //this example shows how to get repunit length

            //create Repunit by Repunit.CreateDivisibleBy(num)
            var repunit = Repunit.CreateDivisibleBy(7);

            //use repunit.Length to get length
            Console.WriteLine("{0} has length of {1}", repunit, repunit.Length);
        }
Exemple #2
0
        public static void CreateDivisibleBy()
        {
            //this example shows how to create least value repunit which is divisible by a number

            //create Repunit by Repunit.CreateDivisibleBy(num)
            var repunit = Repunit.CreateDivisibleBy(7);

            //show result
            Console.WriteLine("{0}/7 = {1}", repunit, int.Parse(repunit.ToString()) / 7);
        }