FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
LetsCodeJava/Introduction/Factorial.java at master · kudoabhijeet/LetsCodeJava · GitHub
kudoabhijeet
/
LetsCodeJava
Public
Notifications
You must be signed in to change notification settings
Fork
2
Star
5
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
LetsCodeJava
/
Introduction
/
Factorial.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
15 lines (14 loc) · 389 Bytes
Breadcrumbs
LetsCodeJava
/
Introduction
/
Factorial.java
Copy path
File metadata and controls
15 lines (14 loc) · 389 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
15
import
java
.
util
.*;
public
class
Factorial
{
public
static
void
main
(
String
[]
args
) {
Scanner
scan
=
new
Scanner
(
System
.
in
);
System
.
out
.
print
(
"Enter a Number to : "
);
int
n
=
scan
.
nextInt
();
int
fact
=
1
;
for
(
int
i
=
n
;
i
>=
1
;
i
--){
fact
=
fact
*
i
;
}
System
.
out
.
println
(
"Factorial : "
+
fact
);
scan
.
close
();
}
}
Back
|
FazBrowse Home
|
New Git URL