int main() {
// your code goes her
int t;
cin>>t;
int n;
for(int i=1;i<=t;i++) {
long pro=1;
cin>>n;
for(int j=1;j<=n;j++) {
pro*=j;
}
cout<<pro<<endl;
}
return 0;
}
Practice problem:FCTRL2
no errors but marks the code wrong
If you do know , please comment and have a nice day
For larger factorial you will need to use some other method to find factorial as 100 factorial contains almost 150 digits where long long can hold up to 18 digits only .
Google how to find factorial of large number in c++ or find it on yt .
Please be a responsible member of the forum by looking up the word FCTRL2 before starting a new topic…like they’re literally 50+ results that could’ve easily helped you.