标签:style blog color io for ar div amp
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个
标签:style blog color io for ar div amp
原文地址:http://www.cnblogs.com/Amoxicil/p/3899597.html