Skip to content
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
kunal9007
C2TC_Core_Java
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
C2TC_Core_Java
/
Factorial_number.java
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
14 lines (12 loc) · 329 Bytes
main
Breadcrumbs
C2TC_Core_Java
/
Factorial_number.java
Copy path
Top
File metadata and controls
Code
Blame
14 lines (12 loc) · 329 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package omkar;
public class Factorial {
static int factorial(int n){
if (n == 1)
return 1;
else
return(n * factorial(n-1));
}
public static void main(String[] args) {
System.out.println("Factorial of 5 is: "+factorial(5));
}
}
You can’t perform that action at this time.