Idk why my answer is not correct

just one test cae is passing

#include<bits/stdc++.h>
using namespace std;

int arr[10000];

int mult(int x,int *arr,int size)
{
int c=0;
for(int i=0;i<size;i++)
{
int y=arr[i]*x+c;
arr[i]=y%10;
c=y/10;
}
while©
{
arr[size]=c;
c=c/10;
size++;
}
return size;
}
void fa(int n)
{
arr[0]=1;
int size=1;

for(int i=2;i<=n;i++)
{
size=mult(i,arr,size);
}

for(int i=size-1;i>=0;i–)
{
cout<<arr[i];
}
}

int main()
{
int n;
cin>>n;
fa(n);
}

@chemant077
What if x is a two digit number, You have to traverse the digit of x individually.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.