1 public class ArithmeticTest{
2 public static void main(String[] args) {
3 int [] a={1,3,5,7,9,11,13,15};
4 int [] b={1,3,5,7,9,11,13,15};
5 int [] c={1,3,5,7,9,11,13,15};
6
7 for(int i=0;i<a.length;i++){
8 for(int j=0;j<b.length;j++){
9 for(int k=0;k<c.length;k++){
10 int number1 = a[i];int number2=b[j];int number3=c[k];
11 if(number1+number2+number3==30){
12 System.out.printf("%d+%d+%d=30%n",number1,number2,number3);
13 }
14 }
15 }
16 }
17 }
18 }