import java.io.*;
class Factorial
{
public static void main(String [] args)
{
try
{
BufferedReader object= new BufferedReader(new InputStreamReader(System.in));
int num,i;
System.out.println("Enter the Number to Calculate the Factorial");
num=Integer.parseInt(object.readLine());
int factorial=1;
System.out.println("The FACTORIAL OF Number"+num+"is:");
for(i=1;i<=num;i++)
{
factorial=factorial*i;
}
System.out.println("The FACTORIAL is"+factorial);
}
catch(Exception e)
{
}
}
}
class Factorial
{
public static void main(String [] args)
{
try
{
BufferedReader object= new BufferedReader(new InputStreamReader(System.in));
int num,i;
System.out.println("Enter the Number to Calculate the Factorial");
num=Integer.parseInt(object.readLine());
int factorial=1;
System.out.println("The FACTORIAL OF Number"+num+"is:");
for(i=1;i<=num;i++)
{
factorial=factorial*i;
}
System.out.println("The FACTORIAL is"+factorial);
}
catch(Exception e)
{
}
}
}