单循环输出乘法表

public class whiledemo {

 public static void main(String[] args)
 {
  for(int i = 1,j = 1  ; j<=9; i++ )
  {
   System.out.print(i+"*"+j+"="+(i*j)+" ");
   if(i==j)
   {
    i=0;
    j++;
    System.out.println();}
   }
  }
 }

原文地址:https://www.cnblogs.com/songyao2018/p/8195208.html