package com.jrtc168.com; |
public class NineToNine { |
public void showNineToNine() { |
for ( int i = 1 ; i <= 9 ; i++) { |
System.out.println(); |
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++) { |
System.out.println(); |
for ( int j = 1 ; j <= i; j++) { |
System.out.print(i + "+" + j + "=" + (i + j) + "\t" ); |
} |
} |
} |
} |
package com.jrtc168.com; |
public class Main { |
|
public static void main(String[] args) { |
NineToNine nine= new NineToNine(); |
nine.showNineToNine(); |
} |
} |
by: 发表于:2017-08-04 14:55:29 顶(0) | 踩(0) 回复
??
回复评论