Commit 2a57d41
committed
feat: Add OneToTen class to print numbers from 1 to user-specified limit
Add a program that:
- Prompts the user to enter a positive number
- Prints numbers from 1 up to the entered value using a `for` loop
- Includes input validation for positive integers
- Demonstrates use of `Scanner`, conditional logic, and loop control in Java.1 parent 3836276 commit 2a57d41
1 file changed
+22
-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 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments