C++编程,n”: 未声明的标识符 是哪的问题? 10
#include<iostream>usingnamespacestd;intmain(){floata[n],x,p;inti;cout<<"inpntx=";cin>...
#include<iostream>
using namespace std;
int main()
{
float a[n], x, p;
int i;
cout << "inpnt x=";
cin >> x;
cout << endl;
cout << "array:";
for (i = 0; i <= 9; i++)
cin >> a[n];
p = a[9];
for (i = 9; i >= 1; i--)
p = p*x + a[i - 1];
cout << "p=" << p << endl;
return 0;
} 展开
using namespace std;
int main()
{
float a[n], x, p;
int i;
cout << "inpnt x=";
cin >> x;
cout << endl;
cout << "array:";
for (i = 0; i <= 9; i++)
cin >> a[n];
p = a[9];
for (i = 9; i >= 1; i--)
p = p*x + a[i - 1];
cout << "p=" << p << endl;
return 0;
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询