标签:col span for循环 rgs class 循环 color out while
//用while或for循环输出1-1000之间能被5整除的数,并且每行输出三个 public class A5 { public static void main(String[] args) { for (int i = 1; i <= 1000; i++) { if (i%5==0){ System.out.print(i+"\t");//print不换行 println换行 } if(i%(5*3)==0){ System.out.println(); } } } }
2021-03-10 00:21:52
用while或for循环输出1-1000之间能被5整除的数,并且每行输出三个
标签:col span for循环 rgs class 循环 color out while
原文地址:https://www.cnblogs.com/z-hou/p/14509161.html