I have a question I have been holding off for about a week, because I thought I can figure it out but I can't!! lol.
Well, I have created an int array just as the following.
int[] a = new int[11];
a[0] = 15;
a[1] = 16
a[2] = 17;
a[3] = 18;
a[4] = 19;
a[5] = 20;
a[6] = 21;
a[7] = 22;
a[8] = 23;
a[9] = 24;
a[10] = 25;
what I want is to get user to input a value from 1 thru 10. I want to be able to match their input with the index of the array, then finally return the value. So, if the user inputs 7, then 22 will be returned, or if user input is 4, then 19 is returned.