Created
October 7, 2024 02:56
-
-
Save kyungjaecheong/7603069772b58dc1e28ec8c71a3c15db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ZeroBase BackEnd School<br> | |
* Java 미니과제 1번 - 구구단 | |
* @author 정경재 (30기) | |
*/ | |
public class M1W2Ex01 { | |
public static void main(String[] args) { | |
System.out.println("[구구단 출력]"); | |
for (int r = 1; r <= 9; r++) { | |
for (int c = 1; c <= 9; c++) { | |
String block = String.format( | |
"%02d x %02d = %02d", | |
c, r, c*r); | |
System.out.print(block); | |
if (c != 9) { | |
System.out.print(" "); | |
} | |
} | |
System.out.println(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment