C# Math.BigMul Method

CsharpProgrammingServer Side Programming

Use the Math.BigMul() method to find the product of two 32-bit numbers.

The following are our two numbers.

int one = 345272828;
int two = 887685744;

Now, get the product.

long res;
res = Math.BigMul(one, two);

Example

 Live Demo

using System;
using System.Globalization;
class Demo {
   static void Main() {
      int one = 345272828;
      int two = 887685744;
      long res;
      res = Math.BigMul(one, two);
      Console.WriteLine("{0} * {1} = {2}", one, two, res);
   }
}

Output

345272828 * 887685744 = 306493767206164032
raja
Published on 14-Sep-2018 13:53:19
Advertisements