What I am doing wrong here?

using namespace std;

int fac(int x)
int ans = 1,j;
ans = ans * j;
cout << ans << endl;
int main()
int i,n,temp;
cin >> n;
int t[n];
for (i=1;i<=n;i++)
cin >>t[i];
temp = t[i];
return 0;

The value of variable ans in your will exceed INT_MAX and hence your codes gives WA. INT data type cannot hold values as big as 100!.

You could search for alternative ways to solve the problem in C/C++ or use languages like Python.

Oh I don’t know, how about YOU TELL ME?