as you can see below I have a variable called costperkm, usually 0.08, then I have an array based on a number, then a second array built around those numbers multiplied by costperkm, but I get the error; http://puu.sh/2sxi7
Scanner costscan=new Scanner(System.in);
double costperkm = costscan.nextDouble();
double distarray[] = new double[5];
distarray[0] = 850;
distarray[1] = 1000;
distarray[2] = 1250;
distarray[3] = 1275;
distarray[4] = 1350;
distarray[5] = 2690;
double costarray[] = new double[5];
costarray[0] = (distarray[0]*costperkm);
costarray[1] = (distarray[1]*costperkm);
costarray[2] = (distarray[2]*costperkm);
costarray[3] = (distarray[3]*costperkm);
costarray[4] = (distarray[4]*costperkm);
costarray[5] = (distarray[5]*costperkm);
System.out.print(costarray[0]);