Write a program in Java to output the product of any three integers between 4 unequal integers.
For example, input 1,7,3,4
calculation process:
734,134,174 ,173
Output: 84,12,28,21
仅有的幸福2017-05-17 10:02:37
int[] arr = {1,4,3,7};
for(int i = 0;i< arr.length;i++){
int num = 1;
for(int j= 0; j<arr.length;j++){
if(i!=j){
num = num * arr[j];
}
}
System.out.println(num);
}