Skip to content

Instantly share code, notes, and snippets.

@kyungjaecheong
Created October 7, 2024 02:56
Show Gist options
  • Save kyungjaecheong/7603069772b58dc1e28ec8c71a3c15db to your computer and use it in GitHub Desktop.
Save kyungjaecheong/7603069772b58dc1e28ec8c71a3c15db to your computer and use it in GitHub Desktop.
/**
* 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