- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExercise33.java
More file actions
Latest commit
15 lines (14 loc) · 674 Bytes
/
Copy pathExercise33.java
File metadata and controls
15 lines (14 loc) · 674 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
publicclassExercise32 {
publicstaticvoidmain(Stringarg[]) {
// Print all the numbers between 1 and 99 that are divisible by 3.
// Also print all the ones that are divisible by 5.
// Also print all the ones that are divisible by both 3 and 5.
// Use commas and spaces to separate the numbers.
// Example output:
// Divisible by 3: 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48,
// 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99,
// Divisible by 5: 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80,
// 85, 90, 95,
// Divisible by both 3 and 5: 15, 30, 45, 60, 75, 90,
}
}