1、JAVA输出5个数换一行4个数的编程如下:public class 类名(自己定义) {public static void main(String[] args) {// TODO Auto-generated method stubSystem.out.print( +2+ +3+ +5+ +7);
2、int c=4;for(int n=2;n<=100;n++){if((n%2==0)||(n%3==0)||(n%5==0)||(n%7==0)){continue; }else{
3、c++; System.out.print( +n);if(c%5==0)System.out.print(n);} } } }。