コード例 #1
0
	/// <summary>
    /// Method to add the two BigFraction datatypes
    /// </summary>
    /// <param name="b">BigFraction being added to the current BigFraction</param>
    /// <returns>result of the addition in the simplest form</returns>
	public BigFraction Add(BigFraction b)
    {
        BigInteger numeratorB = GetNumerator(b.ToString());
        BigInteger denominatorB = GetDenominator(b.ToString());


    }
コード例 #2
0
        public void tostring()
        {
            BigFraction a = new BigFraction(-10);

            output.WriteLine(a.ToString());
            a = new BigFraction(21321.12);
            output.WriteLine(a.ToString());
            a = new BigFraction(new decimal(451.50));
            output.WriteLine(a.ToString());
            a = new BigFraction(new BigInteger(10), new BigInteger(20));
            output.WriteLine(a.ToString());
        }