I made program take number from user then display the factorial of this number >>>> The program works well but if I enter 20 it crashes. I need help how to accept big number in my program ??????
This my program
#include<iostream>
using namespace std ;
long long Fact(long long Num)
{
string Number ;
if(Num==1)
return Num ;
return Num*Fact(Num-1) ;
}
int main()
{
long long n,Num ;
cin>>Num ;
Num=Fact(Num) ;
cout<<Num<<endl;
return 0 ;
}
Thanks in advance :)