Java经典习题16

/*
题目:输出9*9口诀。
*/
public class Class16 {

public static void main(String[] args) {
System.out.println("9*9乘法表如下:");
int t;
for(int i = 1; i <= 9; i++){
for(int j = 1; j <= 9; j++){
t = i*j;
if(j != 9){
System.out.print(i + "*" + j + "=" + t + " ");
}else if(j == 9){
System.out.println(i + "*" + j + "=" + t);
}

}
}

}

}

posted on 2020-02-24 20:17  桌子哥  阅读(147)  评论(0编辑  收藏  举报