Th code is giving correct output for the question small factorial,but CodeChef online judge is resulting wrong answer.Can anyone help me out?Thanks.

The java code for the problem small factorial is giving correct output, but the code chef online judge is resulting wrong answer.
The code is given below. Please help me with this. Thanks.

import java.util.Scanner;
public class Main{
public static void main(String []args)
{
Scanner in=new Scanner(System.in);
int t=in.nextInt();
for(int i=0;i<t;i++)
{
int x=in.nextInt();
int f=1;
while(x>0)
{
f=f*x;
x–;
}
System.out.println(f);
}
}
}

Give forum a search with problem name. This has been answered many times.