首页 > 代码库 > 排列数字

排列数字

public class Division {    public static void main(String[] args){        int count = 1;        for(int number = 100;number <= 1000;number++){            if(number % 5 == 0 && number % 6 == 0){                if(count % 10 ==0){                    System.out.println(number + "  ");                    count++;                }                else{                    System.out.print(number + "  ");                    count++;                }            }        }    }}

编写程序,显示从100到1000之间所有能被5和6整除的数,每行显示10个