Skip to content

Instantly share code, notes, and snippets.

@codingchild2424
Created January 14, 2024 22:37
Show Gist options
  • Select an option

  • Save codingchild2424/ad8b7175ce50d7e6a7edb97cf48f58e3 to your computer and use it in GitHub Desktop.

Select an option

Save codingchild2424/ad8b7175ce50d7e6a7edb97cf48f58e3 to your computer and use it in GitHub Desktop.
Week2_1
import java.util.ArrayList;
public class Week2 {
public static void main(String[] args) {
for (int i = 1; i <= 9; i++) {
ArrayList gugudanList = new ArrayList();
for (int j = 1; j <= 9; j++) {
// result
int result = i * j;
String gugudanLine = String.format("%02d", i) + " X " + String.format("%02d", j) + " = " + String.format("%02d", result) + "\t";
gugudanList.add(gugudanLine);
}
System.out.println(String.join("\t", gugudanList));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment