public static void main(String[] args) throws IOException {
for (int j=0 ; j<18 ; j++){
for (int i =2 ; i<=5 ; i++){
if (j<9){
System.out.print(i + " * " + (j%9+1) + " = " + i*(j%9+1) + "\t");
}else{
System.out.print((i+4) + " * " + (j%9+1) + " = " + (i+4)*(j%9+1) + "\t");
}
}
if (j==8){
System.out.println();
}
System.out.println();
}
}
沒有留言:
張貼留言