[java學習]九九乘法表

mldlx發表於2015-01-06
public class Test {
	public static void multiTable() {
		for(int i=1; i<=9; i++) {
			String str0 = "";
			for(int j=1; j<=i; j++) {
				String str1 = i+"*"+j+"="+i*j+" ";
				str0 = str0 + str1; 
			}
			System.out.println(str0);
		}
	}
	
	public static void main(String[] args) {
		multiTable();
	}
}