| public class Test3 { 
 public  static  void  main(String  []  args)
 {
 method();
 }
 
 public static void method()
 {
 for(int x=1; x<=9; x++)
 {
 for(int y=1; y<=x; y++)
 {
 System.out.print(x+"x"+y+"="+x*y+"\t");
 }
 System.out.println( );
 }
 }
 }
 温馨提示:
 楼主在for嵌套循环中第一个打印输出语句写错啦,不要写println,面是写print
 |