hello, i am in need of some help with a bit of code i been working on. i am getting "illegal start of expression" and "reached end of file while parsing" errors and its been bugging me for awhile as i am not sure why. can anyone help me to get this code to compile correctly and sort out any errors?
import java.util.Scanner;
public class TotalSalesIB
{
//main module
public static void main (String[] args)
{
//set up an array to hold the sales
final int SIZE = 6;
double[] sales = new double[SIZE];
// get the sales
getSales(sales, SIZE);
// display the total sales
showTotal(sales, SIZE);
}
// the getSales module
public static void getSales(double sales[], int size)
{
int index; //loop counter
// get sales for each day.
for (index = 0; index <= SIZE; size--)
{
System.out.print ("Enter the sales for day ", index +1);
Scanner keyboard = new Scanner(System.in);
sales[index] = keyboard.nextDouble();
}
public static void showTotal(double sales[], int size)
{
int index; // loop counter
double total = 0; // Accumulator
// calculate the total sales
for (index = 0; index <= SIZE; size--)
{
total = total + sales[index];
}
//display the total sales
System.out.println ("the total sales are $", total);
}
}