search
LoginSignup
0

posted at

updated at

二重for文② 九九表

実行結果

スクリーンショット 2022-06-16 5.43.19.png

コード

public class Main {
	public static void main(String[] args) {
		for(int i=1; i<=9; i++) {
			for(int j=1; j<=9; j++) {
                System.out.printf("%d*%d=%-4d",i,j,i*j);
                //Sysyem.out.printf(書式, 引数1, 引数2, ....)
            }
            System.out.println("");   
        }
    }
}

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
0