public class Test { public static void main(String[] args) { int i = 2; int a = 0; while(i <= 100) { if(i % 2 == 0) { System.out.print(i + "\t"); a++; } if(a == 5) { System.out.println(); a = 0; } i++; } }}