Factorial Program
class Factorial
{
public static void main(String[] args)
{
int counter,number=5,factorial=1;
for (counter=1;counter<=number ;counter++ )
{
factorial=factorial*counter;
}
System.out.println("Factorial of "+number+" is : "+factorial);
}
}