Sử dụng phương thức Math.BigMul() để tìm tích của hai số 32-bit.
Đây là hai số của chúng ta.
int one = 345272828; int two = 887685744;
Bây giờ, lấy tích.
long res; res = Math.BigMul(one, two);
Ví dụ
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);
}
}
Kết quả
345272828 * 887685744 = 306493767206164032