package HspLearning;
public class DoWhile02 {
public static void main(String[] args) {
int i = 1;
int j = 5;
int k = 3;
int count = 0;
do {
if (i % j == 0 && i % k != 0){
System.out.println(i);
count++;
}
i++;
}while(i<=200);
System.out.println("个数为:"+count);
}
}
-=================
5
10
20
25
35
40
50
55
65
70
80
85
95
100
110
115
125
130
140
145
155
160
170
175
185
190
200
个数为:27
网友评论