Skip to content

Commit f91b28f

Browse files
committed
Practice Done.
Signed-off-by: Someshdiwan <Someshdiwan369@gmail.com>
1 parent ea486da commit f91b28f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
public class PrintNumbersBackward {
2+
public static void main(String[] args) {
3+
countBackwards(7);
4+
}
5+
public static void countBackwards(int n){
6+
if(n==0)
7+
{
8+
System.out.println("Done!");
9+
}
10+
else{
11+
System.out.println(n);
12+
n--;
13+
countBackwards(n);
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)