Hello.....
Where I am wrong in this program.
I am getting declaration syntax error.
#include<iostream.h>
#include<conio.h>
int factorial(int)
int main()
{clrscr();
int n,r,nr,fn,fr,fnr;
int ncr;
cout<<"/n Enter n and r = ";
cin>>n>>r;
fn=factorial(n);
fr=factorial(r);
nr=n-r;
fnr=factorial(nr);
ncr=fn/(fr*fnr);
cout<<"/n nCr ="<<n<<" C "<<r<<" = "<<ncr<<endl;
getch();
return 0;
}
Thanx