public class recursionTest {
public static void main(String[] args) {
//jiujiu();
m(9);
}
/*
* for循环99乘法表
* */
public static void jiujiu(){
for (int i = 1; i < 10; i++) {
for (int j = 1; j <= i; j++) {
System.out.println(j + "*" + i + "=" + j * i+" ");
}
System.out.println(" ");
}
}
/*
* 递归99乘法表
*
* */
public static void m(int i){
if(i==1){
System.out.println("1*1=1");
}else{
m(i-1);
for(int j=1;j<=i;j++){
System.out.println(j + "*" + i + "=" + j * i+" ");
}
System.out.println(" ");
}
}
}