Skip to content

Instantly share code, notes, and snippets.

@Exom9434
Created January 12, 2025 13:17
Show Gist options
  • Save Exom9434/26f0da9e18281a3055443e926631d0ae to your computer and use it in GitHub Desktop.
Save Exom9434/26f0da9e18281a3055443e926631d0ae to your computer and use it in GitHub Desktop.
//노재경
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