public class multiTable {
public static void main(String[] args){
int m=1,n=1;
printTable(m,n);
}
public static void printTable(int i,int j){
if (i==9&&j==10){
return;
}else if(j==10){
j=1;i++;
System.out.println();
}
if(i<=j){
System.out.print(i);System.out.print("*");System.out.print(j);
System.out.print("=");System.out.print(i*j);System.out.print(" ");
}
printTable(i,++j);
}
}
99乘法表(递归版,ps: No for, no while)
最新推荐文章于 2022-11-15 22:25:01 发布