Multiplying Values of an Array
I am trying to write an application that calculates product of odd integers 1-15 and then let the user determine the range of numbers to multiply after that. Here is what I have so far:
Code:
public class PartTwo {
public static void main (String [] args){
int[] array = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
array[0] = 1;
array[2] = 3;
array[4] = 5;
array[6] = 7;
array[8] = 9;
array[10] = 11;
array[12] = 13;
array[14] = 15;
}
}
Where do I go from here? Thanks