Program To find the Factorial Number

 Program To find the Factorial Number

public class FactorialNum {
public static void main(String args[])
{
    int n=5,a=1;
    for(int i=1;i<=n;i++)
    {
        a=a*i;
        
    }
    System.out.println(a);
}
}

Leave a Reply