Commit e8c4066
committed
feat: Count numbers divisible by both 2 and 3 from 1 to 10 using while loop
✅ Logic:
- Iterates from 1 to 10
- Checks divisibility by both 2 and 3 using modulus
- Increments counter if condition is true and prints results.
Signed-off-by: Somesh diwan <[email protected]>1 parent 9663cec commit e8c4066
File tree
1 file changed
+14
-10
lines changed- Section7ConditionalStatements/Loops/src
1 file changed
+14
-10
lines changedLines changed: 14 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
| 2 | + | |
5 | 3 | | |
6 | 4 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
0 commit comments