public static void main(String[] args) {
print();
}
public static void print() {
int count = 1;
for (int a = 1; a < 101; a++) {
int line = count % 5;
if (a % 10 == 9 || a / 10 % 10 == 9) {
continue;
} else {
count++;
System.out.print(a + " \t");
}
switch (line) {
case 0:
System.out.println();
break;
default:
}
}
}
|
|