Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit aa1889c

Browse files
committed
增加Nom64
1 parent 9f35abe commit aa1889c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Recursive/Nom64.java

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package Recursive;
2+
3+
/**
4+
* @author tujietg
5+
* @date 6/2/20 8:02 AM
6+
*/
7+
public class Nom64 {
8+
9+
public int sumNums(int n) {
10+
if (n == 1) {
11+
return 1;
12+
}
13+
return n + sumNums(n - 1);
14+
}
15+
16+
17+
}

0 commit comments

Comments
 (0)