欧拉法求解微分方程c语言
1)多项式评估 (1) Polynomial Evaluation)
We all know what polynomial equations are and it is one of the common problems given to the beginners when they first start learning C. So, there is a simple program shown below which takes the use of functions in C language and solve the polynomial equation entered by the user provided they also enter the value of the unknown variable x.
我们都知道什么是多项式方程式 ,这是初学者刚开始学习C时遇到的常见问题之一。因此,下面显示了一个简单的程序,该程序使用C语言中的函数来求解输入的多项式方程式由用户提供,前提是他们还输入未知变量x的值。
For example, the polynomial equation that we use in our program is f(x) = 2x2+3x+1. Now, we ask the user for the value of x. Suppose, x = 2. After putting this value in f(x) = 2*22+ 3*2+1, we get the answer as f(x) = 15.
例如,我们在程序中使用的多项式方程为f(x)= 2x 2 + 3x + 1 。 现在,我们询问用户x的值。 假设x = 2 。 将这个值放入f(x)= 2 * 2 2 + 3 * 2 + 1后 ,我们得到的答案为f(x)= 15 。
This program exactly does the same calculation with the help of the fact that we can pass an entire array as our function parameter.
我们可以将整个数组作为函数参数进行传递,因此该程序执行了完全相同的计算。