0

Hi all,

i am just asking for help to make this code work, i wrote it but it just tell me "too many arguments for Binomal Function" What should i change ?

```
#include <iostream>
#include <cmath>
using namespace std;
long factorial (long);
long binomal (long);
int main()
{
int x, y,n,k ;
cout << "Enter x:" <<endl;
cin >> x;
cout << "Enter y :" <<endl;
cin >> y;
cout << "Enter n :" <<endl;
cin >> n;
cout << "Enter k :"<<endl;
cin >> k;
binomal(x,y,n,k);
}
long factorial(long j)
{
long f = 1;
for(long i=1 ; i<=j ; i++)
{
f*=i;
}
return f;
}
long binomal(long x , y , n , k)
{
for(k=0;k=n;k++)
{
long result = 0 ;
result = (factorial(n))/(factorial(k)*factorial(n-k))*pow(x,n-k)*pow(y,k);
}
return result;
}
```

Thanks.