I used your suggestion of using an array. It worked. Thanks you so much for the suggestion!
-Can you help me figure out why percent[x] is giving me 0.00? Thanks
int total = 0 ; for(int i = 0 ; i < rate.length; i++) { total += rate[i]; } double [] percent = new double[26]; System.out.println("Total is "+total); System.out.println("Rate at [0] is " + rate[0]); for(int x = 0 ; x < rate.length;x++) { percent[x] = (rate[x] / total); } System.out.println("Percent at [0] is "+percent[0]); Total is 52
Rate at [0] is 7
Percent at [0] is 0.0
** It work when I cast rate[] to an int but why does this occur? Isn't the percent[] is a double so wouldn't it result in a double without me casting the rate[]?