- 1
How do we multiple 20 variables in array in java
variables in array
7 Answers
+ 2
Do you want to save 20 variables in an array? Just make an array of size 20 and add the variables
+ 2
yes, I agree with MR Programmer, we didn't understand you, I didn't understand that you meant MULTIPlY because multiple means lots of and not multiply
0
I couldn't get you try to explain more.
0
the is...
/**
* @(#)Multilication_Array.java
*
* Multilication_Array application
*
* @author
* @version 1.00 2017/4/26
*/
public class Multilication_Array {
public static void main(String[] args) {
int[] values = {10, 20, 35, 45, 52, 9, 14, 101, 34, 56, 66, 89, 12, 39, 67, 89, 20, 80, 40, 45};
int result=1;
for(int value : values){
result *=value;
}
// TODO, add your application code
System.out.println("The result: " + result);
}
}
0
that is the answer
0
you should tell about this that you want to get the product of all 20 element of array
0
ok