请问怎么让五个输出为一行啊?
package com.java.demo;
public class a {
public static void main(String[] args) {
for (int i = 2; i <= 100; i++) {
CheckPrimeNumber(i);
}
}
public static void CheckPrimeNumber(int num) {//num素数
int sum = 0;//1-100
for (int i = 1; i <= num; i++) {
if (num % i == 0) {//不是,继续运行
sum++;
}
}
if (sum == 2) {
System.out.print(num + "\t");
if (sum % 5 == 0)
System.out.println("\n");
}
}
}