error en este codigo
Publicado por horacio (8 intervenciones) el 18/03/2015 23:23:06
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>
#include <cmath>
#define DIM 10
using namespace std;
int main(){
long i,j,p,x[DIM],l=3;
long s=0;
for(i=3;i<=9;i++){
cout<<"x["<<i<<"] = ";
cin>>x[i];
cout<<endl;
}
for(i=1;i<=3;i++){
p=1;
for(j=1;j<=2*i;j++)
p*=j;
s+=pow(-1,i+1)*x[l]*x[l+1]*x[l+2]/p;
l+=2;
}
cout<<"\n\n"<<s;
cout<<"\n\nPresione <ENTER> para retornar al editor"<<endl;
system("pause");
return EXIT_SUCCESS;
}
cual es el error en este codigo??
cuando lo compilo, me dice: "call of overloaded pow(int long int ambiguous)"
no se porque ocurre esto
Valora esta pregunta


0