//package com.itheima;
//九九乘法表
public class ExamTest21 {
public static void main(String[] args) {
for (int x = 1;x<=9;x++){
for(int y = 1;y<=x;y++){
System.out.print(y+"*"+x+"="+x*y+"\t");
}
System.out.println();
}
for (int i = 9;i>0 ;i-- )
{
for (int j=1;j<=i ;j++ )
{
System.out.print(j+"*"+i+"="+i*j+'\t');
}
System.out.println();
}
}
} |
|