Question: Q1. The following declaration is used throughout this example: double[] sales = new double [10]; int index; double largeSale, sum, average; Write the code to
Q1. The following declaration is used throughout this example: double[] sales = new double [10];
int index;
double largeSale, sum, average;
Write the code to the following;
a. Initialize every component of the array to the value 0.
b. Read data from the keyboard and store it in the array. You will be filling the whole array.
c. Print all of the items in the array in reverse order.
d. Find the sum and the average of the elements in the array.
e. Determine the smallest and largest element of the array.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
