Hey Y'all I have this problem that I am having trouble with:
Write a function which takes an array of coefficients, ai and and integer n, and returns the value of the following equation. Also write a code fragment to show how to call your function.
y=a0 + a1(x) + a2(x^2) + a3(x^3) + .... an(x^n)
Heres what I have so far:
1 2 3 4 5 6
int equation(int a[i], int n); //function declaration
...
equation(a[i], n); //call function
...
int equation(int a[i], int n) //function prototype
{
Any help/suggestions is greatly appreciated. Thanks!