while로 구현한 구구단
public class Main {
public static void main(String[] args) {
int i = 1;
while (i < 10) {
int j = 1;
System.out.print(i + "단 : ");
while (j < 10) {
System.out.print(i + "*" + j + "=" + (i * j) + " ");
j++;
}
System.out.println();
i++;
}
}
}
'algorithm' 카테고리의 다른 글
백준 solved.ac gitHub 자동 업로드 에러 (0) | 2023.03.08 |
---|