Commit c6280f3
committed
feat: Print first 10 natural numbers in reverse using while loop
🧠 Logic:
- Initialize a counter `i` to 10.
- Use a `while` loop to print numbers from 10 down to 1.
- Decrement `i` after each iteration.
- Demonstrates reverse iteration using a basic `while` loop structure.
Signed-off-by: Somesh diwan <[email protected]>1 parent 4df163d commit c6280f3
1 file changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments