Who is the error?:
import java.util.*;
public class Main
{
public static int factorial( int n )
{
if( n<=1)
return 1;
else
return n*factorial( n-1);
}
public static void main(String args[])
{
Scanner s=new Scanner(System.in);
int n;int a;
if((n=s.nextInt())>=1&&n<=100){
int i=1;
while(i++<=n)
{
if((a=s.nextInt())>=1&&n<=100)
System.out.println(factorial(a));
}
}
}
}