Exemple #1
0
        private BigInt IntMultiply(int a, int b)
        {
            BigInt result = new BigInt();

            for (int i = 0; i < b; i++)
            {
                result.Add(a);
            }

            return(result);
        }
Exemple #2
0
        public static void Test()
        {
            //Console.WriteLine(int.MaxValue);

            BigInt bigA = new BigInt();
            BigInt bigB = new BigInt();

            //1000000000
            //999999999
            //11000000000
            bigA.Add(500000000);
            bigB.Add(888888888);

            bigA.Multiply(bigB);

            Console.WriteLine(bigA);

            //int x = -22;
            //Console.WriteLine(x % 4);
        }
Exemple #3
0
        public static void Test()
        {
            //Console.WriteLine(int.MaxValue);

            BigInt bigA = new BigInt();
            BigInt bigB = new BigInt();

            //1000000000
            //999999999
            //11000000000
            bigA.Add(500000000);
            bigB.Add(888888888);

            bigA.Multiply(bigB);

            Console.WriteLine(bigA);

            //int x = -22;
            //Console.WriteLine(x % 4);
        }
Exemple #4
0
        private BigInt IntMultiply(int a, int b)
        {
            BigInt result = new BigInt();

            for (int i = 0; i < b; i++)
            {
                result.Add(a);
            }

            return result;
        }