Created
January 12, 2025 13:17
-
-
Save Exom9434/26f0da9e18281a3055443e926631d0ae 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
//노재경 | |
public class Main { | |
private static final int START = 1; // 구구단 시작 단 | |
private static final int END = 9; // 구구단 끝 단 | |
public static void main(String[] args) { | |
System.out.println("[구구단 출력]"); | |
printGugudan(START, END); | |
} | |
private static void printGugudan(int start, int end) { | |
for (int i = start; i <= end; i++) { | |
for (int j = start; j <= end; j++) { | |
System.out.printf("%02d x %02d = %02d\t", j, i, i * j); | |
} | |
System.out.println(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment