Commit 4df163d
committed
feat: Print first N natural numbers in reverse order using for loop
🧠 Logic:
- Program prompts the user to enter a number `n`.
- A for-loop runs from `n` down to 1, printing each number.
- Demonstrates basic input handling and reverse-order iteration.
- Suitable for practicing loop constructs and Scanner usage.
Signed-off-by: Somesh diwan <[email protected]>1 parent fb7e4d6 commit 4df163d
1 file changed
+0
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
24 | 22 | | |
25 | | - | |
26 | 23 | | |
27 | 24 | | |
28 | 25 | | |
| |||
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
37 | | - | |
38 | 34 | | |
39 | | - | |
40 | 35 | | |
41 | 36 | | |
42 | 37 | | |
| |||
0 commit comments