using System; using System.Numerics; class Program { static void Main(string[] args) { BigInteger num1 = new BigInteger(12345678901234567890); BigDecimal bigDec1 = BigDecimal.Parse(num1.ToString()); int num2 = 10; BigDecimal bigDec2 = new BigDecimal(num2); BigDecimal result = bigDec1.Divide(bigDec2); Console.WriteLine(result); // Output: 1234567890123456789.0 } }
using System; class Program { static void Main(string[] args) { BigDecimal bigDec1 = new BigDecimal(123.4567890123456789); BigDecimal bigDec2 = new BigDecimal(4.567890123456789); BigDecimal result = bigDec1.Divide(bigDec2); Console.WriteLine(result); // Output: 27.0 } }In this example, we create two BigDecimal objects representing decimal numbers with high precision. We then call the Divide method on the first BigDecimal object with the second BigDecimal object as the argument. The result is a new BigDecimal object representing the quotient, which is printed to the console. The package library for the BigDecimal class in csharp is System.Data.OracleClient. However, this package has been deprecated since version 4.5 of .NET framework. Alternatives include the decimal type in csharp or third-party libraries like NCalc and Math.NET.