#include <iostream>
using namespace std;
int f(int x, int a, int b, int c, int d)
{
return a * x * x * x + b * x * x + c * x + d;
}
int main()
{
int x = 2, a = 1, b = 2, c = 4, d = 8;
cout << f(x, a, b, c, d);
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int f(int x,int a,int b,int c,int d)
{
return a*x*x*x+b*x*x+c*x+d;
}
int main()
{
int x=2,a=1,b=2,c=4,d=8;
cout<<f(x,a,b,c,d);
return 0;
}
数据类型 数组名[数组长度];
数据类型 数组名[数组长度] = {值1,值2......};
数据类型 数组名[] = {值1,值2......};;