当前位置:网站首页>multiplication table

multiplication table

2022-06-25 21:22:00 vancomycin

Nine nine multiplication tables are actually printing double loops , One outer cycle , The inner loop performs a round .

See the following for the detailed code :

package com.qfedu.test1;
// multiplication table 
public class Test4 {
	public static void main(String args[]) {
		System.out.println(" Please output the 99 multiplication table :");
		for (int i = 1; i <= 9; i++) {
			for (int j = 1; j <= i; j++) {
				System.out.print(i+"*"+j+"="+i*j+" ");			
			}System.out.println();
		}
	}
}

原网站

版权声明
本文为[vancomycin]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202181329516294.html