int f, t, n;
int another;
vector <int> myVect;
int i=0;
scanf("%d",&n);
int temp;
for (i=0; i<n; i +=1)
{
scanf("%d",&temp);
myVect.push_back(temp);
}
for (int q=0; q<n; q++){
f = myVect.at(q);
another = 1;
int t = f;
for (t; t>0; t += (-1)){
another = another * t;
}
cout<<another<<endl;
}
return 0;
Above Answer is absolutely correct.I just want to add one more thing,You can calculate 100! using BiGInteger class in java.So its your choice,you can go either way.My suggestion is that go with @rishabhprsd7 bhaiya…You will learn a lot if you do it that way…