Added indentation in the "main" function statement block

This commit is contained in:
Vikrant khedkar
2020-05-08 10:38:05 +05:30
committed by GitHub
parent f44f2c176b
commit f6d67253e3

View File

@ -3,11 +3,11 @@ import java.util.*; //for importing scanner
public class Factorial {
public static void main(String[] args) { //main method
int n = 1;
Scanner sc= new Scanner(System.in);
System.out.println("Enter Number");
n=sc.nextInt();
System.out.println(n + "! = " + factorial(n));
int n = 1;
Scanner sc= new Scanner(System.in);
System.out.println("Enter Number");
n=sc.nextInt();
System.out.println(n + "! = " + factorial(n));
}
//Factorial = n! = n1 * (n-1) * (n-2)*...1