package com.haskell; |
public class Multiplicative { |
public void table(){ |
for ( int i= 1 ;i<= 9 ;i++){ |
for ( int j= 1 ;j<=i;j++){ |
System.out.print(i+ "*" +j+ "=" +i*j+ "\t" ); |
} |
System.out.println( "" ); |
} |
for ( int i= 1 ;i<= 9 ;i++){ |
for ( int j= 1 ;j<=i;j++){ |
System.out.print(j+ "*" +i+ "=" +j*i+ "\t" ); |
} |
System.out.println( "" ); |
} |
for ( int i= 1 ;i<= 9 ;i++){ |
for ( int j= 1 ;j<=i;j++){ |
System.out.print(i+ "-" +j+ "=" +(i-j)+ "\t" ); |
} |
System.out.println( "" ); |
} |
for ( int i= 1 ;i<= 9 ;i++){ |
for ( int j= 1 ;j<=i;j++){ |
System.out.print(j+ "+" +i+ "=" +(j+i)+ "\t" ); |
} |
System.out.println( "" ); |
} |
for ( int i= 1 ;i<= 9 ;i++){ |
for ( int j= 1 ;j<=i;j++){ |
System.out.print(i+ "/" +j+ "=" +i/j+ "\t" ); |
} |
System.out.println( "" ); |
} |
} |
} |
package com.haskell; |
public class Main { |
public static void main(String args[]){ |
Multiplicative multiplicative= new Multiplicative(); |
multiplicative.table(); |
} |
} |
by: 发表于:2017-08-04 14:55:38 顶(0) | 踩(0) 回复
??
回复评论