main() 함수 내에는 숫자를 사용하지 말고 즉, #define 을 이용하여 1, 2, 3 세 개의 숫자를 조합하여 가능한 한 모든 합을 출력하는 프로그램을 작성하시오.
출력예와 같이 출력하시오
package com.jungol.algorithm170;
public class Main {
public static void main(String[] args) {
Main main = new Main();
main.print();
}
private void print() {
int[] ar = {1, 2, 3};
for(int i = 1; i <= ar.length; i++) {
for(int j = 1; j <= ar.length; j++) {
System.out.println(i + " + " + j + " = " + (i + j));
}
}
}
}