import java.io.*;
class pr2
{
public static void main(String args[])throws IOException
{
DataInputStream br=new DataInputStream(System.in);
System.out.println("Enter the Number:->");
int No=Integer.parseInt(br.readLine());
int fact=1,i=1;
for(i=1;i<=No;i++)
{
fact=fact*i;
}
System.out.println("The Factorial of ["+No+"] is :=>"+fact);
}
}
No comments:
Post a Comment