黑马程序员技术交流社区

标题: 基础编程题 乘法口诀 [打印本页]

作者: 王子鹏    时间: 2016-5-26 10:01
标题: 基础编程题 乘法口诀
  1. class demo
  2. {
  3.           private int i;
  4.           private int j;

  5.         void temp(int i,int j)
  6.           {
  7.                         this.i=i;
  8.                         this.j=j;
  9.                         for (this.i=i;i<=this.j;i++)
  10.                         {
  11.                                 //int s = i*j;
  12.                                 System.out.print(i+"*"+j+"="+i*j+"     \t"  );
  13.                         }
  14.                         System.out.println();
  15.                         if(j!=100)
  16.                         {
  17.                                 this.j=j+1;
  18.                         temp(1,this.j);
  19.                         }
  20.                 }
  21. }

  22.        
  23. public class 乘法口诀 {

  24.         public static void main(String[] args) {
  25.                 demo o =new demo();
  26.                 o.temp(1, 1);
  27.        
  28. }
  29. }
复制代码

乘法口诀表  
作者: daniel031699    时间: 2016-5-31 07:24
我来盖个楼......




欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2