This is regarding small factorial in easy challenges.

I am getting wrong answer. Can someone please explain the fault in my program?

#include
using namespace std;

int main()
{
long int t,n,f;
cin>>t;
for(int i=0;i<t;i++)
{
f=1;
n=0;
cin>>n;
for(int j=1;j<=n;j++)
{
f=f*j;
}
cout<<f<<"\n";
}
return 0;
}

See int f=“1” is wrong . int f=1 is right and I also think you are not aware of C++ Input/output fomats.
Once you refer tutorials in the internet and again try thi problem

Happy Coding!

plz make your basics clear about input/output
its cin >> n;
and int f=1;
n=0;
you are using unnecessarily " "
pls clear your concept about writing codes :slight_smile:

//