For 循环的基础使用

 import java.io.BufferedReader;
 import java.io.InputStreamReader;


public class Chengfakoujuebiao {
    public static void main (String[] args)
    throws java.io.IOException 
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("本程序将打印出99乘法口诀表!");
        
        for(int i=1;i < 10;i++) 
        { 
            for(int j=1;j <= i;j++) 
              { 
                  System.out.print(j+ "* "+i+ "= "+j*i+ "\t "); 
                  if(j==i)   
                  {
                      System.out.println();
                  }               
              }             
        } 
    }
}

猜你喜欢

转载自chamwarren.iteye.com/blog/2194923