Commit 2505077
committed
feat: Add And2 class with explicit zero handling in divisibility check
Enhance the divisibility checker by:
- Accepting two user inputs
- Handling the special case where input is 0 (since 0 is divisible by any number)
- Using logical AND (&&) for standard divisibility checks
- Providing meaningful output for all cases including edge input.1 parent 424db51 commit 2505077
1 file changed
+1
-3
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 | | |
| |||
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | | - | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
| |||
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
27 | | - | |
| 25 | + | |
28 | 26 | | |
29 | 27 | | |
0 commit comments