We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f44f2c1 commit f6d6725Copy full SHA for f6d6725
Maths/Factorial.java
@@ -3,11 +3,11 @@
3
4
public class Factorial {
5
public static void main(String[] args) { //main method
6
- int n = 1;
7
-Scanner sc= new Scanner(System.in);
8
-System.out.println("Enter Number");
9
-n=sc.nextInt();
10
- 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));
11
}
12
13
//Factorial = n! = n1 * (n-1) * (n-2)*...1
0 commit comments