`
chamwarren
  • 浏览: 11185 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

For 循环的基础使用

    博客分类:
  • java
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();
                  }               
              }             
        } 
    }
}

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics