public class Test
{
public static void main(String[] args)
for(int i=1;i<7;i++)
System.out.printf("%d!=%d%n",i,Factorial(i));
}
static long Factorial(int n)
long r=1;
while(n>0)
r*=n--;
return r;