Q:

Write a C# Sharp program to calculate the full product of two 32-bit numbers

0

Write a C# Sharp program to calculate the full product of two 32-bit numbers.
Expected Output:
Calculate the product of two Int32 values:
2147483647 * 2147483647 = 4611686014132420609

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

using System;
using System.Text;
namespace exercises {
  class Program {
    public static void Main() {
      int int1 = Int32.MaxValue;
      int int2 = Int32.MaxValue;
      long longResult;
      longResult = Math.BigMul(int1, int2);
      Console.WriteLine("Calculate the product of two Int32 values:");
      Console.WriteLine("{0} * {1} = {2}", int1, int2, longResult);
    }
  }
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now