Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started