Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/apna-college/Alpha
/ printInc
Method
printInc
7_RecursionBasics/RecursionBasics.java:11–18 ·
view source on GitHub ↗
(int n)
Source
from the content-addressed store, hash-verified
9
}
10
11
public
static
void
printInc(
int
n) {
12
if
(n == 1) {
13
System.out.print(n+
" "
);
14
return
;
15
}
16
printInc(n-1);
17
System.out.print(n+
" "
);
18
}
19
20
public
static
int
fact(
int
n) {
21
if
(n == 0) {
Callers
nothing calls this directly
Calls
1
print
Method · 0.45
Tested by
no test coverage detected