Math类常用函数及应用举例

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication6
{
    class Program
    {
        static void Main(string[] args)
        {
            //输入x,计算关于x的一元多次方程的值
            double x, y;
            Console.Write("x=");
            x = Convert.ToDouble(Console.ReadLine());
            y = Math.Pow(x, 3) + 2*Math.Pow(x, 2) + 8 * x - 9;
            Console.WriteLine("x^3-2*x^2+8*x-9=" + y);
        }
    }
}

原文地址:https://www.cnblogs.com/roytanlu/p/2686018.html