在C#中, BigMul()是方法类方法。此方法用于计算两个32位数字的全积。
句法:
public static long BigMul(int a, int b)
参数:
a: It is the first number to be multiplied and the type of this parameter is System.Int32.
b: It is the Second number to be multiplied and the type of this parameter is System.Int32.
返回类型:此方法返回一个包含指定数字乘积的数字,并且此方法的返回类型为System.Int64 。
例子:
// C# program to demonstarte the
// Math.BigMul() method
using System;
namespace ConsoleApplication1 {
class Geeks {
// Main Method
static void Main(string[] args)
{
// defining two variable of type
// System.Int32
Int32 x1 = 233232322;
Int32 x2 = 189222338;
// Using BigMul( ) method and storing
// result into a long(Int64) variable
long product = Math.BigMul(x1, x2);
// Getting the output
Console.WriteLine("The product of the two numbers is " + product);
}
}
}
输出:
The product of the two numbers is 44132765266008836