使用Java编写九九乘法表
public class table {
public static void main(String[] args) {
for (int x = 1; x<=9 ; x++){//控制行数
for (int y = 1; y<=x;y++){
int result = x*y;
System.out.printf("%d*%d=%d\t",x,y,result);
/*System.out.print(x+"*"+y+"="+(x*y)+"\t");*/ // \t 为制表符
}
System.out.println("");//换行
}
}
}