public class Test1 {
public static void main(String[] args) {
knockSeven();
}
//在控制台打印出1-100中带7的数字或者7的倍数
public static void knockSeven(){
for (int i=1;i<=100;i++){
int ge=i%10;
int shi=i/10%10;
if (ge==7||shi==7||i%7==0){
System.out.println(i);
}
}
}
}
标签:void,打印,static,倍数,knockSeven,控制台,public
From: https://blog.51cto.com/u_15988249/6215710