Here we write a java program which find out the factorial of any number.

Through keyboard we insert a number and get the factorial of that number.

Through keyboard we insert a number and get the factorial of that number.

public class FindFactorial

{

public static void
main(String as[])

{

//take input from keyboard

int
a=Integer.parseInt(as[0]);

//initilize fact varialbe as 1

int fact=1;

System.out.print("factorial
of number-"+a);

for(int i=1;i<=a;i++)

{

fact=fact*i;

}

System.out.println("is
:------"+fact);

}

}