In question fctrl2 it not accepting my answer, why?

using namespace std;
int fact(int n){
int nfact=1;
for(int a=n; a>=1; a–)
return nfact;
int main() {
int n;
int no[n];
for(int a=0; a<n; a++)
for(int b=0; b<n; b++)
return 0;

what is wrong in it according to question?
Solution link

please give a link to your solution. BTW in fact function is that a-- or just a- ?

1 Like

Please see the constraints of the problem. n is 100. You cannot find 100 factorial normally like this. Either use strings or use inbuilt c++ boost hpp library