Answer:
for(int i =0; i<yearlySalesTotals.length;i++)
Explanation:
The for statement in has the syntax as given above, it has an int variable indicating the starting index, then a boolen condition ensuring that you don't get out of the array bounds, and an increment operator.
See below a complete program in java that will output all elements of the array  assuming the array yearlySalesTotals contains only ten elements and all indexes has been assigned values.
public class ANot {
  public static void main(String[] args) {
double []yearlySalesTotals = new double[10];
for(int i = 0; i<yearlySalesTotals.length; i++){
  System.out.println(yearlySalesTotals[i]);
  }
}
}