General C++ Programming

HI, i've problem with coding the factorial func. Can anyone help?!
Last edited on
1
2
3
4
5
6
7
8
9
int long long factorial(int const & nr)
{
   int long long fact=1;

   for(i=1;i<=n;++i)
     fact*=i;

  return fact;
}
Last edited on
Topic archived. No new replies allowed.