FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
training-java-future-program/Factorial.java at master · YuAndyTX/training-java-future-program · GitHub
This repository was archived by the owner on Dec 15, 2020. It is now read-only.
YuAndyTX
/
training-java-future-program
Public archive
forked from
bliblidotcom/training-java-future-program
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
training-java-future-program
/
Factorial.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
19 lines (17 loc) · 328 Bytes
Breadcrumbs
training-java-future-program
/
Factorial.java
Copy path
File metadata and controls
19 lines (17 loc) · 328 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
16
17
18
19
import
java
.
util
.*;
public
class
Factorial
{
public
static
void
main
(
String
args
[])
{
if
(
args
.
length
!=
1
){
System
.
out
.
println
(
"Usage Factorial <numeric-number>"
);
return
;
}
int
n
=
Integer
.
parseInt
(
args
[
0
]);
int
sum
=
1
;
for
(
int
i
=
2
;
i
<=
n
;
i
++){
sum
*=
i
;
}
System
.
out
.
println
(
"Sum = "
+
sum
);
}
}
Back
|
FazBrowse Home
|
New Git URL